mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0024802: "help" command shouldn't apply implicit rules in definition process of what command description it should show
-When in "help <command>" <command> was exactly found in existing draw commands, then helpstring for this <command> is displayed, else "help" fails and error message is displayed -When "*word" or "word*" or any other combination is given in args, then help command performs typical wildcard search.
This commit is contained in:
parent
e3709f1d0a
commit
2bc75a1bce
@ -61,8 +61,8 @@ proc help {{command ""} {helpstring ""} {group "Procedures"}} {
|
|||||||
}
|
}
|
||||||
} elseif {$helpstring == ""} {
|
} elseif {$helpstring == ""} {
|
||||||
|
|
||||||
# help fonction
|
# help function
|
||||||
append command "*"
|
set isfound 0
|
||||||
foreach f [lsort [array names Draw_Helps]] {
|
foreach f [lsort [array names Draw_Helps]] {
|
||||||
if {[string match $command $f]} {
|
if {[string match $command $f]} {
|
||||||
puts -nonewline $f
|
puts -nonewline $f
|
||||||
@ -70,6 +70,14 @@ proc help {{command ""} {helpstring ""} {group "Procedures"}} {
|
|||||||
puts -nonewline " "
|
puts -nonewline " "
|
||||||
}
|
}
|
||||||
puts " : $Draw_Helps($f)"
|
puts " : $Draw_Helps($f)"
|
||||||
|
set isfound 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if {!$isfound} {
|
||||||
|
if {[string first * $command] != -1} {
|
||||||
|
puts "No matching commands found!"
|
||||||
|
} else {
|
||||||
|
puts "No help found for '$command'! Please try 'help $command*' to find matching commands."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user