diff options
Diffstat (limited to 'tcllib/support/devel/sak/help/cmd.tcl')
-rw-r--r-- | tcllib/support/devel/sak/help/cmd.tcl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tcllib/support/devel/sak/help/cmd.tcl b/tcllib/support/devel/sak/help/cmd.tcl new file mode 100644 index 0000000..8fe5f8e --- /dev/null +++ b/tcllib/support/devel/sak/help/cmd.tcl @@ -0,0 +1,25 @@ +# -*- tcl -*- +# Implementation of 'help'. + +# Available variables +# * argv - Cmdline arguments + +if {[llength $argv] > 2} { + puts stderr "Usage: $argv0 help ?topic?" + exit 1 +} + +package require sak::help + +if {[llength $argv] == 1} { + # Argument is a topic. + # Locate text for the topic. + + sak::help::print [sak::help::on [lindex $argv 0]] + return +} + +sak::help::print [sak::help::alltopics] + +## +# ### |