aboutsummaryrefslogtreecommitdiff
path: root/ensemble.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-07-08 09:58:48 +1000
committerSteve Bennett <steveb@workware.net.au>2023-08-13 15:05:05 +1000
commit41c73f09a2ed866b57ee67eaaee94cd7ad1a9db6 (patch)
tree54714a09a199bc8dfd241a7de3557b7e92da8dbd /ensemble.tcl
parentef0b05c3fa344564529db450bc2638ad45e334a4 (diff)
downloadjimtcl-cmd-register.zip
jimtcl-cmd-register.tar.gz
jimtcl-cmd-register.tar.bz2
info: procs, commands, don't returns commands with spacescmd-register
We implement ensembles by creating commands with spaces, like {tree children}. This can clutter the commands returned by 'info procs', 'info commands'. So don't return these by default. Add the '-all' option return all commands. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'ensemble.tcl')
-rw-r--r--ensemble.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/ensemble.tcl b/ensemble.tcl
index 9e87809..5c49808 100644
--- a/ensemble.tcl
+++ b/ensemble.tcl
@@ -18,7 +18,7 @@ proc ensemble {command args} {
if {$subcmd in {-commands -help}} {
# Need to remove $autoprefix from the front of these
set prefixlen [string length $autoprefix]
- set subcmds [lmap p [lsort [info commands $autoprefix*]] {
+ set subcmds [lmap p [lsort [info commands -all $autoprefix*]] {
string range $p $prefixlen end
}]
if {$subcmd eq "-commands"} {