cmdr
Check-in [fe780034dd]
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:Tweaked the formatting of arguments in the generated help.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fe780034ddc8552b7edcc1e824b27ba4fe898a94
User & Date: andreask 2013-10-17 18:16:46
Context
2013-10-17
18:17
Bumped cmdr version to 0.6 check-in: e3e822290d user: andreask tags: trunk
18:16
Tweaked the formatting of arguments in the generated help. check-in: fe780034dd user: andreask tags: trunk
2013-10-16
19:21
Bumped cmdr version to 0.5 check-in: 41becb3194 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to help.tcl.

473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
proc ::cmdr::help::format::Arguments {arguments parameters} {
    set result {}
    foreach a $arguments {
	set v [dict get $parameters $a]
	dict with v {} ; # -> code, desc, label
	switch -exact -- $code {
	    +  { set text "$label" }
	    ?  { set text "?${label}?" }
	    +* { set text "${label}..." }
	    ?* { set text "?${label}...?" }
	}
	lappend result $text
    }
    return [join $result]
}

proc ::cmdr::help::format::HasOptions {options} {






|
|
|
|







473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
proc ::cmdr::help::format::Arguments {arguments parameters} {
    set result {}
    foreach a $arguments {
	set v [dict get $parameters $a]
	dict with v {} ; # -> code, desc, label
	switch -exact -- $code {
	    +  { set text "<$label>" }
	    ?  { set text "\[<${label}>\]" }
	    +* { set text "<{label}>..." }
	    ?* { set text "\[<${label}>...\]" }
	}
	lappend result $text
    }
    return [join $result]
}

proc ::cmdr::help::format::HasOptions {options} {