cmdr
Check-in [60dbdef1b0]
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 tclconference@googlegroups.com
or submit via the online form by Sep 9.

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

Overview
Comment:Fixed buglet in the help setup. Add the main (root) name to the command prefix when not in a cli shell. Bumped cmdr::help to version 1.0.1.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:60dbdef1b0807df26b358590a6aa05e73ba3a5ce
User & Date: andreask 2014-01-13 21:03:16
Context
2014-01-30
18:09
Fixed missing initialization in the main help generator. check-in: 3a146bdf51 user: andreask tags: trunk
2014-01-13
21:03
Fixed buglet in the help setup. Add the main (root) name to the command prefix when not in a cli shell. Bumped cmdr::help to version 1.0.1. check-in: 60dbdef1b0 user: andreask tags: trunk
2013-12-18
20:29
Fix broken requirements cmdr::help::json and *::sql. Were not updated to v1. check-in: d46922cc52 user: andreask tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to help.tcl.

    53     53   
    54     54   proc ::cmdr::help::query {actor words} {
    55     55       debug.cmdr/help {}
    56     56       # Resolve chain of words (command name path) to the actor
    57     57       # responsible for that command, starting from the specified actor.
    58     58       # This is very much a convenience command.
    59     59   
    60         -    return [[query-actor $actor $words] help $words]
           60  +    set root   [$actor root]
           61  +    set prefix $words
           62  +
           63  +    if {![$root exists *in-shell*] ||
           64  +	![$root get    *in-shell*]} {
           65  +	# Not in the shell, put executable's name into the prefix.
           66  +	set prefix [linsert $prefix 0 [$root name]]
           67  +    }
           68  +
           69  +    return [[query-actor $actor $words] help $prefix]
    61     70   }
    62     71   
    63     72   proc ::cmdr::help::query-actor {actor words} {
    64     73       debug.cmdr/help {}
    65     74       # Resolve chain of words (command name path) to the actor
    66     75       # responsible for that command, starting from the specified actor.
    67     76       # This is very much a convenience command.
................................................................................
   506    515   
   507    516       return $categories
   508    517   }
   509    518   
   510    519   
   511    520   # # ## ### ##### ######## ############# #####################
   512    521   ## Ready
   513         -package provide cmdr::help 1.0
          522  +package provide cmdr::help 1.0.1