From c10245f7f51e25f8c7e3a6c4b85f43c629056e67 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 20 Jun 2021 19:19:18 -0700 Subject: [PATCH] help command for long arglists --- tcl/Util.tcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcl/Util.tcl b/tcl/Util.tcl index fa9178b1..0f7eb720 100644 --- a/tcl/Util.tcl +++ b/tcl/Util.tcl @@ -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