cmdr
Check-in [b64206b4e3]
Not logged in

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

Overview
Comment:cmdr::help - Prevent the space allocated to descriptions in the categorized help from getting to small. Negatives trigger an error in adjust, and anything below 10 will generate very short tall columns. Better to misformat (cut at terminal edge, or wrap-around) for these cases. Bumped version to 1.3.2.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b64206b4e38233dbaa2ded02a2631f66abbd68ad
User & Date: andreask 2014-11-04 18:05:38.872
Context
2014-11-26
23:12
Followup on [463519edc6]. Fixed missing handling of "arglabel" data in the json, tcl, and sql help formats. check-in: 9660d12cb0 user: andreask tags: trunk
2014-11-04
18:05
cmdr::help - Prevent the space allocated to descriptions in the categorized help from getting to small. Negatives trigger an error in adjust, and anything below 10 will generate very short tall columns. Better to misformat (cut at terminal edge, or wrap-around) for these cases. Bumped version to 1.3.2. check-in: b64206b4e3 user: andreask tags: trunk
2014-10-08
21:13
When printing config state, show parameter inheritance. Plus label now showing regular names, no titling. check-in: 7501cc673b user: andreask tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to help.tcl.
372
373
374
375
376
377
378






379
380
381
382
383
384
385

    # With the padding all labels are the same length. We can
    # precompute the blank and the width to format the descriptions
    # into.

    regsub -all {[^\t]}  "$indent[lindex $labels 0]$sep" { } blank
    set w [expr {$width - [string length $blank]}]







    # Print the commands, final formatting.
    set commands 0
    foreach label $labels desc $descs {
	set desc [textutil::adjust::adjust $desc \
		      -length $w \
		      -strictlength 1]







>
>
>
>
>
>







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391

    # With the padding all labels are the same length. We can
    # precompute the blank and the width to format the descriptions
    # into.

    regsub -all {[^\t]}  "$indent[lindex $labels 0]$sep" { } blank
    set w [expr {$width - [string length $blank]}]
    if {$w < 10} {
	# Force a minimum size for the description. This will cause
	# either cutting at the terminal width, and/or wrapping into
	# the next line, depending on the terminal.
	set w 10
    }

    # Print the commands, final formatting.
    set commands 0
    foreach label $labels desc $descs {
	set desc [textutil::adjust::adjust $desc \
		      -length $w \
		      -strictlength 1]
603
604
605
606
607
608
609
610
    }

    return $categories
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::help 1.3.1







|
609
610
611
612
613
614
615
616
    }

    return $categories
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::help 1.3.2