cmdr
Check-in [4add0ceabc]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:help - Switched to method "extend" over "learn" to define the command, simpler.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4add0ceabc4a54e0d22c5cc8018398c300d69615
User & Date: andreask 2014-04-15 19:30:39
Original Comment: Switched to method "extend" over "learn" to define the command, simpler.
Context
2014-04-15
19:42
Added hooks for history mgmt, plus helper package to the system. Known issue: *prefix* handling for recursion (aliases). check-in: 639bdf2ae3 user: andreask tags: trunk
19:30
help - Switched to method "extend" over "learn" to define the command, simpler. check-in: 4add0ceabc user: andreask tags: trunk
19:27
Hide docs from kettle's scanner for Tcl packages. check-in: 8a156a1311 user: andreask tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to help.tcl.

   102    102   	    alias w
   103    103   	    validate integer ;# better: integer > 0, or even > 10
   104    104   	    generate [lambda {p} { linenoise columns }]
   105    105   	}
   106    106       }
   107    107       lappend map @[email protected] [linsert [join $formats {, }] end-1 and]
   108    108       lappend map @[email protected] [join $options \n]
   109         -    lappend map @[email protected]   $actor
   110    109   
   111         -    $actor learn [string map $map {private help {
          110  +    $actor extend help [string map $map {
   112    111   	section *AutoGenerated*
   113    112   	description {
   114    113   	    Retrieve help for a command or command set.
   115    114   	    Without arguments help for all commands is given.
   116    115   	    The default format is --full.
   117    116   	}
   118    117   	@[email protected]
................................................................................
   121    120   	    This field is fed by the options @[email protected]
   122    121   	} { default {} }
   123    122   	input cmdname {
   124    123   	    The entire command line, the name of the
   125    124   	    command to get help for. This can be several
   126    125   	    words.
   127    126   	} { optional ; list }
   128         -    } {::cmdr::help::auto-help @[email protected]}}]
          127  +    }] [list ::cmdr::help::auto-help $actor]
   129    128       return
   130    129   }
   131    130   
   132    131   proc ::cmdr::help::auto-help {actor config} {
   133    132       debug.cmdr/help {}
   134    133   
   135    134       set width  [$config @width]