help command for long arglists
This commit is contained in:
parent
865520038d
commit
c10245f7f5
|
|
@ -230,15 +230,15 @@ proc show_cmd_args { cmd } {
|
|||
set arglist $cmd_args($cmd)
|
||||
# Break the arglist up into max_col length lines.
|
||||
while {1} {
|
||||
if {[regexp {(^ *)([a-zA-Z0-9_\\\|\-]+|\[.*\])(.*)} \
|
||||
if {[regexp {(^ *)([a-zA-Z0-9_\\\|\-]+|\[[^\[]+\])(.*)} \
|
||||
$arglist ignore space arg rest]} {
|
||||
set arg_length [string length $arg]
|
||||
if { $col + $arg_length < $max_col } {
|
||||
set line "$line $arg"
|
||||
set col [expr $col + $arg_length + 1]
|
||||
} else {
|
||||
report_line $line
|
||||
set line "$line$indent_str $arg"
|
||||
report_line $line
|
||||
set line "$indent_str $arg"
|
||||
set col [expr $indent + $arg_length + 1]
|
||||
}
|
||||
set arglist $rest
|
||||
|
|
|
|||
Loading…
Reference in New Issue