help command for long arglists

This commit is contained in:
James Cherry 2021-06-20 19:19:18 -07:00
parent 865520038d
commit c10245f7f5
1 changed files with 3 additions and 3 deletions

View File

@ -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