cmdr
Check-in [84658915a6]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

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

Overview
Comment:Tweaked output for help --full, added option arguments for options requiring them.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84658915a64e05cad7ee1b2ef07e05ade380d370
User & Date: aku 2014-08-29 05:07:50
Context
2014-08-29
20:19
cmdr::parameter - Extended spec with description of option argument, if any. cmdr::help - Modified to make use of the new information in help texts. check-in: 463519edc6 user: andreask tags: trunk
05:07
Tweaked output for help --full, added option arguments for options requiring them. check-in: 84658915a6 user: aku tags: trunk
2014-08-27
23:41
Bump versions of cmdr::color and cmdr::ask to 1. Fixed a prompt issue in cmdr::ask::string*. Extended debug narrative regarding prompt handling. check-in: 9d0fa722e9 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to help.tcl.

232
233
234
235
236
237
238











239
240
241
242
243
244
245
    }

    # plus per-option descriptions (sort by flag name)
    if {[dict size $options]} {
	set onames {}
	set odefs  {}
	foreach {oname ohelp} [::cmdr util dictsort $options] {











	    lappend onames $oname
	    lappend odefs  $ohelp
	}
	DefList $width $onames $odefs
    }

    # plus per-argument descriptions (keep in cmdline order)






>
>
>
>
>
>
>
>
>
>
>







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    }

    # plus per-option descriptions (sort by flag name)
    if {[dict size $options]} {
	set onames {}
	set odefs  {}
	foreach {oname ohelp} [::cmdr util dictsort $options] {
	    # Inspect the parameter and determine of the option
	    # requires an argument. If yes, suitably extend the
	    # definition key of the option list.
	    set pname [dict get $opt2para $oname]
	    set vt    [dict get $parameters $pname validator]
	    if {$vt ne "::cmdr::validate::boolean"} {
		# FUTURE: Make the argument label specifiable.
		set plabel [dict get $parameters $pname label]
		append oname " [string toupper $plabel]"
	    }

	    lappend onames $oname
	    lappend odefs  $ohelp
	}
	DefList $width $onames $odefs
    }

    # plus per-argument descriptions (keep in cmdline order)