cmdr
Check-in [5ae1694710]
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:Merged trunk testsuite fixes.
Timelines: family | ancestors | descendants | both | neg-aliases
Files: files | file ages | folders
SHA1:5ae1694710b2d31bf11722e0153091af5123b176
User & Date: aku 2015-05-11 22:28:55
Context
2015-05-11
23:01
Fix overwrite of outer loop variable. check-in: 374d694490 user: aku tags: neg-aliases
22:28
Merged trunk testsuite fixes. check-in: 5ae1694710 user: aku tags: neg-aliases
22:27
Really complete fixes for help testsuite. check-in: 868958ed6d user: aku tags: trunk
2015-05-08
00:17
Begin support of negative/inverted aliases for boolean options. check-in: a09daa498b user: andreask tags: neg-aliases
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to color.tcl.

204
205
206
207
208
209
210

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229










230
231
232
233
234
235
236
    dict set char $name $spec
    return
}

# # ## ### ##### ######## ############# #####################

proc ::cmdr::color::Unknown {cmd codes {text {}}} {

    list [namespace current]::Apply $codes
}

proc ::cmdr::color::Apply {codes {text {}}} {
    debug.cmdr/color {}

    variable active
    if {!$active} {
	debug.cmdr/color {not active}
	return $text
    }

    variable char
    foreach c $codes {
	if {![dict exists $char $c]} {
	    return -code error \
		-errorcode [list CMDR COLOR UNKNOWN $c] \
		"Expected a color name, got \"$c\""
	}










	append r [dict get $char $c]
    }
    if {$text ne {}} {
	append r $text
	append r [dict get $char reset]
    }








>






|
|
|
<
<
<







>
>
>
>
>
>
>
>
>
>







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
    dict set char $name $spec
    return
}

# # ## ### ##### ######## ############# #####################

proc ::cmdr::color::Unknown {cmd codes {text {}}} {
    debug.cmdr/color {}
    list [namespace current]::Apply $codes
}

proc ::cmdr::color::Apply {codes {text {}}} {
    debug.cmdr/color {}

    # Check codes first. Even if not active! IOW do not stop catching
    # the use of bad/unknown codes just because we switched off the
    # colorization.



    variable char
    foreach c $codes {
	if {![dict exists $char $c]} {
	    return -code error \
		-errorcode [list CMDR COLOR UNKNOWN $c] \
		"Expected a color name, got \"$c\""
	}
    }

    variable active
    if {!$active} {
	debug.cmdr/color {not active}
	return $text
    }

    # Apply chosen colors. Validation happend already.
    foreach c $codes {
	append r [dict get $char $c]
    }
    if {$text ne {}} {
	append r $text
	append r [dict get $char reset]
    }

Changes to tests/ask.test.

1
2
3
4
5
6
7
8
9
10
..
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- tcl -*- tcl.tk//DSL tcltest//EN//2.0
# # ## ### ##### ######## ############# #####################
## Testing the cmdr::color package.

kt check Tcl     8.5
kt check tcltest 2

kt require support Tclx
kt require support debug
kt require support debug::caller
................................................................................
} -returnCodes error \
    -result {unknown or ambiguous subcommand "foo": must be choose, menu, string, string*, string/extended, or yn}

# # ## ### ##### ######## ############# #####################
## Go through the API commands.
## yn, string, string*, string/extended, menu, choose
#
## Only basic args checks. Everything else goes into interaction,
## which the tcltest is not suited for.
#
## Idea: Replace linenoise with a mockup command to record calls and
## returns fixed results.

# # ## ### ##### ######## ############# #####################
## yn


|







 







|







1
2
3
4
5
6
7
8
9
10
..
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- tcl -*- tcl.tk//DSL tcltest//EN//2.0
# # ## ### ##### ######## ############# #####################
## Testing the cmdr::ask package.

kt check Tcl     8.5
kt check tcltest 2

kt require support Tclx
kt require support debug
kt require support debug::caller
................................................................................
} -returnCodes error \
    -result {unknown or ambiguous subcommand "foo": must be choose, menu, string, string*, string/extended, or yn}

# # ## ### ##### ######## ############# #####################
## Go through the API commands.
## yn, string, string*, string/extended, menu, choose
#
## Only basic args checks at the moment. Everything else goes into interaction,
## which the tcltest is not suited for.
#
## Idea: Replace linenoise with a mockup command to record calls and
## returns fixed results.

# # ## ### ##### ######## ############# #####################
## yn

Changes to tests/color.test.

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
156
157
158
159
160
161
162




















163
164
165
166
167
168
169
    hidden	{\033[8m}
    italic	{\033[3m}
    magenta	{\033[35m}
    name	{\033[34m}
    neutral	{\033[34m}
    no		{\033[31m}
    no-blink	{\033[25m}
    no-bold	{\033[22m}
    no-dim	{\033[__m}
    no-hidden	{\033[28m}
    no-italic	{\033[23m}
    no-revers	{\033[27m}
    no-strike	{\033[29m}
    no-underline {\033[24m}
    note	{\033[34m}
    number	{\033[32m}
................................................................................
    yellow	{\033[33m}
    yes		{\033[32m}
}

set thedefs {
    advisory	=yellow
    bad		=red
    bg-black	{\033[40m}
    bg-blue	{\033[44m}
    bg-cyan	{\033[46m}
    bg-default	{\033[49m}
    bg-green	{\033[42m}
    bg-magenta	{\033[45m}
    bg-red	{\033[41m}
    bg-white	{\033[47m}
    bg-yellow	{\033[43m}
    black	{\033[30m}
    blink	{\033[5m}
    blue	{\033[34m}
    bold	{\033[1m}
    confirm	=red
    cyan	{\033[36m}
    default	{\033[39m}
    dim		{\033[2m}
    error	=magenta
    good	=green
    green	{\033[32m}
    hidden	{\033[8m}
    italic	{\033[3m}
    magenta	{\033[35m}
    name	=blue
    neutral	=blue
    no		=red
    no-blink	{\033[25m}
    no-bold	{\033[22m}
    no-dim	{\033[__m}
    no-hidden	{\033[28m}
    no-italic	{\033[23m}
    no-revers	{\033[27m}
    no-strike	{\033[29m}
    no-underline {\033[24m}
    note	=blue
    number	=green
    prompt	=blue
    red		{\033[31m}
    reset	{\033[0m}
    revers	{\033[7m}
    strike	{\033[9m}
    underline	{\033[4m}
    unknown	=cyan
    warning	=yellow
    white	{\033[37m}
    yellow	{\033[33m}
    yes		=green
}

# # ## ### ##### ######## ############# #####################
## Basic wrong#args checks.

test cmdr-color-1.0 {color, wrong num args, not enough} -body {
    cmdr color
} -returnCodes error \
    -result {wrong # args: should be "cmdr color subcommand ?argument ...?"}

test cmdr-color-1.1 {color, bogus sub-command, not enough args} -body {
    cmdr color foo
} -returnCodes error \
    -result {wrong # args: should be "::cmdr::color::Unknown cmd codes text"}

test cmdr-color-1.2 {color, bogus sub-command, bogus color name} -setup {
    set save [cmdr color active]
    cmdr color activate 1
} -body {
    cmdr color foo text
} -cleanup {
    cmdr color activate $save
    unset save
} -returnCodes error -result {Expected a color name, got "foo"}

test cmdr-color-2.0 {color, formatting, single code} -setup {
    set save [cmdr color active]
    cmdr color activate 1
} -body {
    cmdr color red text
} -cleanup {
................................................................................
    cmdr color activate 1
} -body {
    cmdr color {bold red} text
} -cleanup {
    cmdr color activate $save
    unset save
} -result "\033\[1m\033\[31mtext\033\[0m"





















# # ## ### ##### ######## ############# #####################
## Go through the API commands.
## active, activate, names, get, get-def, define, exists

# # ## ### ##### ######## ############# #####################
## active







|
|







 







|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|


|
|
|
|



|
|
|
|
|
|
|
|



|
|
|
|
|


|
|











|
|
|
|
|
|
|
|
|
|
|
|
|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
    hidden	{\033[8m}
    italic	{\033[3m}
    magenta	{\033[35m}
    name	{\033[34m}
    neutral	{\033[34m}
    no		{\033[31m}
    no-blink	{\033[25m}
    no-bold	{\033[21m}
    no-dim	{\033[22m}
    no-hidden	{\033[28m}
    no-italic	{\033[23m}
    no-revers	{\033[27m}
    no-strike	{\033[29m}
    no-underline {\033[24m}
    note	{\033[34m}
    number	{\033[32m}
................................................................................
    yellow	{\033[33m}
    yes		{\033[32m}
}

set thedefs {
    advisory	=yellow
    bad		=red
    bg-black	e40
    bg-blue	e44
    bg-cyan	e46
    bg-default	e49
    bg-green	e42
    bg-magenta	e45
    bg-red	e41
    bg-white	e47
    bg-yellow	e43
    black	e30
    blink	e5
    blue	e34
    bold	e1
    confirm	=red
    cyan	e36
    default	e39
    dim		e2
    error	=magenta
    good	=green
    green	e32
    hidden	e8
    italic	e3
    magenta	e35
    name	=blue
    neutral	=blue
    no		=red
    no-blink	e25
    no-bold	e21
    no-dim	e22
    no-hidden	e28
    no-italic	e23
    no-revers	e27
    no-strike	e29
    no-underline e24
    note	=blue
    number	=green
    prompt	=blue
    red		e31
    reset	e0
    revers	e7
    strike	e9
    underline	e4
    unknown	=cyan
    warning	=yellow
    white	e37
    yellow	e33
    yes		=green
}

# # ## ### ##### ######## ############# #####################
## Basic wrong#args checks.

test cmdr-color-1.0 {color, wrong num args, not enough} -body {
    cmdr color
} -returnCodes error \
    -result {wrong # args: should be "cmdr color subcommand ?argument ...?"}

test cmdr-color-1.1 {color, wrong num args, too many} -body {
    cmdr color red text X
} -returnCodes error \
    -result {wrong # args: should be "::cmdr::color::Unknown cmd codes ?text?"}

test cmdr-color-1.2 {color, bogus sub-command, bogus color name, no text} -body {
    cmdr color foo
} -returnCodes error -result {Expected a color name, got "foo"}

test cmdr-color-1.3 {color, bogus sub-command, bogus color name, with text} -body {
    cmdr color foo text
} -returnCodes error -result {Expected a color name, got "foo"}

# # ## ### ##### ######## ############# #####################

test cmdr-color-2.0 {color, formatting, single code} -setup {
    set save [cmdr color active]
    cmdr color activate 1
} -body {
    cmdr color red text
} -cleanup {
................................................................................
    cmdr color activate 1
} -body {
    cmdr color {bold red} text
} -cleanup {
    cmdr color activate $save
    unset save
} -result "\033\[1m\033\[31mtext\033\[0m"

test cmdr-color-2.2 {color, formatting, single code, no text} -setup {
    set save [cmdr color active]
    cmdr color activate 1
} -body {
    cmdr color red
} -cleanup {
    cmdr color activate $save
    unset save
} -result "\033\[31m"

test cmdr-color-2.3 {color, formatting, multi-code, no text} -setup {
    set save [cmdr color active]
    cmdr color activate 1
} -body {
    cmdr color {bold red}
} -cleanup {
    cmdr color activate $save
    unset save
} -result "\033\[1m\033\[31m"

# # ## ### ##### ######## ############# #####################
## Go through the API commands.
## active, activate, names, get, get-def, define, exists

# # ## ### ##### ######## ############# #####################
## active

Changes to tests/help.tests.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53


54


















































































































55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73


74
75
76
77
78
79
80
81
82
83
84
85
86
87


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107


108
109
110
111
112
113
114
115
116
117
118
119
120
121


122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189


190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294


295
296
297
298
299
300
301
302
303
304


305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324


325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
349
350
351
352
353
354
355

356
357
358
359
360
361
362
363
364
365
366
367
368


369
370
371
372
373
374
375
...
382
383
384
385
386
387
388

389
390
391
392
393
394
395
396
397
398
399
400
401


402
403
404
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419
420
421
422
423
424


425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442

443
444
445
446
447
448
449
450
451
452
453
454
455


456
457
458
459
460
461
462
463
464
465

466
467
468
469
470
471
472
473
474
475
476
477
478


479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496

497
498
499
500
501
502
503
504
505
506
507
508
509


510
511
512
513
514
515
516
517
518
519

520
521
522
523
524
525
526
527
528
529
530
531
532
533


534
535
536
537
538
539
540
...
547
548
549
550
551
552
553

554
555
556
557
558
559
560
561
562
563
564
565
566
567


568
569
570
571
572
573
574
...
576
577
578
579
580
581
582


583
584
585
586
587
588
589
590
591
592
593


594
595
596
597
598
599
600
601


602
603
604
605
606
607
608
609
610
611
612


613
614
615
616
617
618
619
620


621
622
623
624
625
626
627
628
629
630
631


632
633
634
635
636
637
638
639
640


641
642
643
644
645
646
647
648
649
650
651
652
653
654


655
656
657
658
659
660
661
662

663
664
665

666
667

668
669
670

671
672

673
674
675

676
677
678
679
680
681
682
683
684
685
686
	    private cloak {} ::dagger
	}
    }

    regsub -all {::oo::Obj\d+::} [x help] {ZZZ::}
} -cleanup {
    x destroy
} -result {{bar aloha} {desc hawaii options {--lulu loop --no-lulu {Complementary alias of --lulu.}} opt2para {--lulu lulu --no-lulu lulu} arguments {yoyo jump run} states {} parameters {jump {cmdline 1 code ? default {} defered 0 description gate documented yes flags {} generator {} interactive no isbool 0 label jump list no ordered 1 presence no prompt {Enter jump: } required no threshold 1 type input validator ::cmdr::validate::identity} lulu {cmdline 1 code ? default no defered 0 description loop documented yes flags {--lulu primary --no-lulu inverted} generator {} interactive no isbool 1 label lulu list no ordered 0 presence no prompt {Enter lulu: } required 0 threshold {} type option validator ::cmdr::validate::boolean} run {cmdline 1 code +* default {} defered 0 description lane documented yes flags {} generator {} interactive no isbool 0 label run list yes ordered 1 presence no prompt {Enter run: } required 1 threshold {} type input validator ::cmdr::validate::identity} yoyo {cmdline 1 code + default {} defered 0 description height documented yes flags {} generator {} interactive no isbool 0 label yoyo list no ordered 1 presence no prompt {Enter yoyo: } required 1 threshold {} type input validator ::cmdr::validate::identity}} sections {} action ::hula} {bar help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.


	    } --short {


















































































































		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {


		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_bar}} {bar exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {snafu aloha} {desc hawaii options {--lulu loop --no-lulu {Complementary alias of --lulu.}} opt2para {--lulu lulu --no-lulu lulu} arguments {yoyo jump run} states {} parameters {jump {cmdline 1 code ? default {} defered 0 description gate documented yes flags {} generator {} interactive no isbool 0 label jump list no ordered 1 presence no prompt {Enter jump: } required no threshold 1 type input validator ::cmdr::validate::identity} lulu {cmdline 1 code ? default no defered 0 description loop documented yes flags {--lulu primary --no-lulu inverted} generator {} interactive no isbool 1 label lulu list no ordered 0 presence no prompt {Enter lulu: } required 0 threshold {} type option validator ::cmdr::validate::boolean} run {cmdline 1 code +* default {} defered 0 description lane documented yes flags {} generator {} interactive no isbool 0 label run list yes ordered 1 presence no prompt {Enter run: } required 1 threshold {} type input validator ::cmdr::validate::identity} yoyo {cmdline 1 code + default {} defered 0 description height documented yes flags {} generator {} interactive no isbool 0 label yoyo list no ordered 1 presence no prompt {Enter yoyo: } required 1 threshold {} type input validator ::cmdr::validate::identity}} sections {} action ::hula} {snafu help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.


	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {


		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_bar}} {snafu exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {tool pliers help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.


	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_pliers}} {tool pliers exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {tool hammer nail} {desc workbench options {--driver force --force {Alias of --driver.}} opt2para {--driver driver --force driver} arguments supply states context parameters {context {cmdline 0 code {} default {} defered 1 description orientation documented yes flags {} generator {} interactive no isbool 0 label context list no ordered 0 presence no prompt {Enter context: } required 1 threshold {} type state validator ::cmdr::validate::identity} driver {cmdline 1 code ?* default 0 defered 0 description force documented yes flags {--force alias --driver primary} generator {} interactive no isbool 0 label driver list yes ordered 0 presence no prompt {Enter driver: } required 0 threshold {} type option validator adouble} supply {cmdline 1 code ?* default {} defered 0 description magazine documented yes flags {} generator {} interactive no isbool 0 label supply list yes ordered 1 presence no prompt {Enter supply: } required no threshold 0 type input validator ::cmdr::validate::identity}} sections {} action ::wall} {tool hammer help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_hammer}} {tool hammer exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {tool help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.


	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_tool}} {tool exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {hammer nail} {desc workbench options {--driver force --force {Alias of --driver.}} opt2para {--driver driver --force driver} arguments supply states context parameters {context {cmdline 0 code {} default {} defered 1 description orientation documented yes flags {} generator {} interactive no isbool 0 label context list no ordered 0 presence no prompt {Enter context: } required 1 threshold {} type state validator ::cmdr::validate::identity} driver {cmdline 1 code ?* default 0 defered 0 description force documented yes flags {--force alias --driver primary} generator {} interactive no isbool 0 label driver list yes ordered 0 presence no prompt {Enter driver: } required 0 threshold {} type option validator adouble} supply {cmdline 1 code ?* default {} defered 0 description magazine documented yes flags {} generator {} interactive no isbool 0 label supply list yes ordered 1 presence no prompt {Enter supply: } required no threshold 0 type input validator ::cmdr::validate::identity}} sections {} action ::wall} {hammer help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_hammer}} {hammer exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} help {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ::x}} exit {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}}}

test cmdr-help-1.1 {help structure, inverted boolean option} -body {
    cmdr create x foo {
	description TEST
	private nail {
	    description workbench
	    option no-driver force { list ; alias force }
	} ::wall
    }
    x help


} -cleanup {
    x destroy
} -result {nail {desc workbench options {--driver {Complementary alias of --no-driver.} --force {Alias of --no-driver.} --no-driver force} opt2para {--driver no-driver --force no-driver --no-driver no-driver} arguments {} states {} parameters {no-driver {cmdline 1 code ?* default {} defered 0 description force documented yes flags {--force alias --no-driver primary --driver inverted} generator {} interactive no isbool 1 label no-driver list yes ordered 0 presence no prompt {Enter no-driver: } required 0 threshold {} type option validator ::cmdr::validate::boolean}} sections {} action ::wall} help {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.


	    } --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {


		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ::x}} exit {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {::oo::Obj973::my shell-exit}}}

# # ## ### ##### ######## ############# #####################

test cmdr-help-2.0 {full - formatting help structure} -body {
    HelpLarge full
} -result {bar aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii
................................................................................
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

bar exit
    Exit the shell. No-op if not in a shell.



snafu aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii

    --lulu    loop
    --no-lulu Complementary alias of --lulu.

................................................................................
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

snafu exit
    Exit the shell. No-op if not in a shell.



tool pliers help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

tool pliers exit
    Exit the shell. No-op if not in a shell.



tool hammer nail [OPTIONS] [<supply>...]
    workbench

    --driver force
    --force  Alias of --driver.

    supply magazine

tool hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

tool hammer exit
    Exit the shell. No-op if not in a shell.



tool help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

tool exit
    Exit the shell. No-op if not in a shell.



hammer nail [OPTIONS] [<supply>...]
    workbench

    --driver force
    --force  Alias of --driver.

    supply magazine

hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

hammer exit
    Exit the shell. No-op if not in a shell.



help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

exit
    Exit the shell. No-op if not in a shell.
}



test cmdr-help-2.1 {full formatting - help structure, inverted boolean option} -body {
    HelpSmall full
} -result {nail [OPTIONS]
    workbench

    --driver    Complementary alias of
................................................................................
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.

    --short       Activate short form of the help.
    --width       The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w            Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

exit
    Exit the shell. No-op if not in a shell.
}



# # ## ### ##### ######## ############# #####################

test cmdr-help-3.0 {short - formatting help structure} -body {
    HelpLarge short
} -result {bar aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii
................................................................................
bar help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

bar exit
    Exit the shell. No-op if not in a shell.



snafu aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii

snafu help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

snafu exit
    Exit the shell. No-op if not in a shell.



tool pliers help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

tool pliers exit
    Exit the shell. No-op if not in a shell.



tool hammer nail [OPTIONS] [<supply>...]
    workbench

tool hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

tool hammer exit
    Exit the shell. No-op if not in a shell.



tool help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

tool exit
    Exit the shell. No-op if not in a shell.



hammer nail [OPTIONS] [<supply>...]
    workbench

hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

hammer exit
    Exit the shell. No-op if not in a shell.



help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

exit
    Exit the shell. No-op if not in a shell.
}



test cmdr-help-3.1 {short formatting - help structure, inverted boolean option} -body {
    HelpSmall short
} -result {nail [OPTIONS]
    workbench

help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

exit
    Exit the shell. No-op if not in a shell.
}



# # ## ### ##### ######## ############# #####################

test cmdr-help-4.0 {list - formatting help structure} -body {
    HelpLarge list
} -result {    bar aloha [OPTIONS] <yoyo> [<jump>] <run>...
    bar help [OPTIONS] [<cmdname>...]
    bar exit

    snafu aloha [OPTIONS] <yoyo> [<jump>] <run>...
    snafu help [OPTIONS] [<cmdname>...]
    snafu exit

    tool pliers help [OPTIONS] [<cmdname>...]
    tool pliers exit

    tool hammer nail [OPTIONS] [<supply>...]
    tool hammer help [OPTIONS] [<cmdname>...]
    tool hammer exit

    tool help [OPTIONS] [<cmdname>...]
    tool exit

    hammer nail [OPTIONS] [<supply>...]
    hammer help [OPTIONS] [<cmdname>...]
    hammer exit

    help [OPTIONS] [<cmdname>...]
    exit}

test cmdr-help-4.1 {list formatting - help structure, inverted boolean option} -body {
    HelpSmall list
} -result {    nail [OPTIONS]
    help [OPTIONS] [<cmdname>...]
    exit}

# # ## ### ##### ######## ############# #####################
return







|







>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|

|



|


|

|

|
>
>

|



|
|







>
>
|





|

|



|


|

|

|
>
>

|



|
|







>
>
|





|

|



|


|

|

|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



|
|







>
>
|





|

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|


|

|

|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



|
|









<
>
>


|







>
>
|





|

|



|


|

|

|
>
>

|



|
|







 







>

|



|







>
>







 







>

|



|







>
>










>

|



|







>
>




|
|












>

|



|







>
>










>

|



|







>
>




|
|












>

|



|







>
>










>

|



|







|
>
>







 







>

|



|







|
>
>







 







>
>











>
>








>
>











>
>








>
>











>
>








|
>
>













|
>
>








>



>


>



>


>



>











39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
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
257
258
259
260
261
262
263
264
265
266
267













268



















269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292


































293
294
295
296
297
298
299
300
301
302
303
304
305













306



















307
308
309
310
311
312
313
314
315
316
317
318
319
320
321

322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
...
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
...
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
...
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
...
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
	    private cloak {} ::dagger
	}
    }

    regsub -all {::oo::Obj\d+::} [x help] {ZZZ::}
} -cleanup {
    x destroy
} -result {{bar aloha} {desc hawaii options {--lulu loop --no-lulu {Complementary alias of --lulu.}} opt2para {--lulu lulu --no-lulu lulu} arguments {yoyo jump run} states {} parameters {jump {cmdline 1 code ? default {} defered 0 description gate documented yes flags {} generator {} interactive no isbool 0 label jump arglabel jump list no ordered 1 presence no prompt {Enter jump: } required no threshold 1 type input validator ::cmdr::validate::identity} lulu {cmdline 1 code ? default no defered 0 description loop documented yes flags {--lulu primary --no-lulu inverted} generator {} interactive no isbool 1 label lulu arglabel lulu list no ordered 0 presence no prompt {Enter lulu: } required 0 threshold {} type option validator ::cmdr::validate::boolean} run {cmdline 1 code +* default {} defered 0 description lane documented yes flags {} generator {} interactive no isbool 0 label run arglabel run list yes ordered 1 presence no prompt {Enter run: } required 1 threshold {} type input validator ::cmdr::validate::identity} yoyo {cmdline 1 code + default {} defered 0 description height documented yes flags {} generator {} interactive no isbool 0 label yoyo arglabel yoyo list no ordered 1 presence no prompt {Enter yoyo: } required 1 threshold {} type input validator ::cmdr::validate::identity}} sections {} action ::hula} {bar help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_bar}} {bar exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} bar {desc {} options {} opt2para {} arguments {} states {} parameters {} sections {}} {snafu aloha} {desc hawaii options {--lulu loop --no-lulu {Complementary alias of --lulu.}} opt2para {--lulu lulu --no-lulu lulu} arguments {yoyo jump run} states {} parameters {jump {cmdline 1 code ? default {} defered 0 description gate documented yes flags {} generator {} interactive no isbool 0 label jump arglabel jump list no ordered 1 presence no prompt {Enter jump: } required no threshold 1 type input validator ::cmdr::validate::identity} lulu {cmdline 1 code ? default no defered 0 description loop documented yes flags {--lulu primary --no-lulu inverted} generator {} interactive no isbool 1 label lulu arglabel lulu list no ordered 0 presence no prompt {Enter lulu: } required 0 threshold {} type option validator ::cmdr::validate::boolean} run {cmdline 1 code +* default {} defered 0 description lane documented yes flags {} generator {} interactive no isbool 0 label run arglabel run list yes ordered 1 presence no prompt {Enter run: } required 1 threshold {} type input validator ::cmdr::validate::identity} yoyo {cmdline 1 code + default {} defered 0 description height documented yes flags {} generator {} interactive no isbool 0 label yoyo arglabel yoyo list no ordered 1 presence no prompt {Enter yoyo: } required 1 threshold {} type input validator ::cmdr::validate::identity}} sections {} action ::hula} {snafu help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_bar}} {snafu exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} snafu {desc {} options {} opt2para {} arguments {} states {} parameters {} sections {}} {tool pliers help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_pliers}} {tool pliers exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {tool pliers} {desc {} options {} opt2para {} arguments {} states {} parameters {} sections {}} {tool hammer nail} {desc workbench options {--driver force --force {Alias of --driver.}} opt2para {--driver driver --force driver} arguments supply states context parameters {context {cmdline 0 code {} default {} defered 1 description orientation documented yes flags {} generator {} interactive no isbool 0 label context arglabel context list no ordered 0 presence no prompt {Enter context: } required 1 threshold {} type state validator ::cmdr::validate::identity} driver {cmdline 1 code ?* default 0 defered 0 description force documented yes flags {--force alias --driver primary} generator {} interactive no isbool 0 label driver arglabel driver list yes ordered 0 presence no prompt {Enter driver: } required 0 threshold {} type option validator adouble} supply {cmdline 1 code ?* default {} defered 0 description magazine documented yes flags {} generator {} interactive no isbool 0 label supply arglabel supply list yes ordered 1 presence no prompt {Enter supply: } required no threshold 0 type input validator ::cmdr::validate::identity}} sections {} action ::wall} {tool hammer help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_hammer}} {tool hammer exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {tool hammer} {desc {} options {} opt2para {} arguments {} states {} parameters {} sections {}} {tool help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_tool}} {tool exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} tool {desc {} options {} opt2para {} arguments {} states {} parameters {} sections {}} {hammer nail} {desc workbench options {--driver force --force {Alias of --driver.}} opt2para {--driver driver --force driver} arguments supply states context parameters {context {cmdline 0 code {} default {} defered 1 description orientation documented yes flags {} generator {} interactive no isbool 0 label context arglabel context list no ordered 0 presence no prompt {Enter context: } required 1 threshold {} type state validator ::cmdr::validate::identity} driver {cmdline 1 code ?* default 0 defered 0 description force documented yes flags {--force alias --driver primary} generator {} interactive no isbool 0 label driver arglabel driver list yes ordered 0 presence no prompt {Enter driver: } required 0 threshold {} type option validator adouble} supply {cmdline 1 code ?* default {} defered 0 description magazine documented yes flags {} generator {} interactive no isbool 0 label supply arglabel supply list yes ordered 1 presence no prompt {Enter supply: } required no threshold 0 type input validator ::cmdr::validate::identity}} sections {} action ::wall} {hammer help} {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {













		Activate short form of the help.



















	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ZZZ::officer_hammer}} {hammer exit} {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} hammer {desc {} options {} opt2para {} arguments {} states {} parameters {} sections {}} help {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {


































	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {













		Activate short form of the help.



















	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ::x}} exit {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {} {desc TEST options {} opt2para {} arguments {} states {} parameters {} sections {}}}

test cmdr-help-1.1 {help structure, inverted boolean option} -body {
    cmdr create x foo {
	description TEST
	private nail {
	    description workbench
	    option no-driver force { list ; alias force }
	} ::wall
    }


    regsub -all {::oo::Obj\d+::} [x help] {ZZZ::}
} -cleanup {
    x destroy
} -result {nail {desc workbench options {--driver {Complementary alias of --no-driver.} --force {Alias of --no-driver.} --no-driver force} opt2para {--driver no-driver --force no-driver --no-driver no-driver} arguments {} states {} parameters {no-driver {cmdline 1 code ?* default {} defered 0 description force documented yes flags {--force alias --no-driver primary --driver inverted} generator {} interactive no isbool 1 label no-driver arglabel no-driver list yes ordered 0 presence no prompt {Enter no-driver: } required 0 threshold {} type option validator ::cmdr::validate::boolean}} sections {} action ::wall} help {desc {Retrieve help for a command or command set.
	    Without arguments help for all commands is given.
	    The default format is --full.} options {--by-category {
		Activate by-category form of the help.
	    } --full {
		Activate full form of the help.
	    } --list {
		Activate list form of the help.
	    } --no-pager {
	    Disable use of paging.
	} --short {
		Activate short form of the help.
	    } --width {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} -w {Alias of --width.}} opt2para {--by-category by-category --full full --list list --no-pager no-pager --short short --width width -w width} arguments cmdname states format parameters {by-category {cmdline 1 code ? default no defered 0 description {
		Activate by-category form of the help.
	    } documented yes flags {--by-category primary} generator {} interactive no isbool 1 label by-category arglabel by-category list no ordered 0 presence yes prompt {Enter by-category: } required 0 threshold {} type option validator ::cmdr::validate::boolean} cmdname {cmdline 1 code ?* default {} defered 0 description {
	    The entire command line, the name of the
	    command to get help for. This can be several
	    words.
	} documented yes flags {} generator {} interactive no isbool 0 label cmdname arglabel cmdname list yes ordered 1 presence no prompt {Enter cmdname: } required no threshold 0 type input validator ::cmdr::validate::identity} format {cmdline 0 code {} default {} defered 1 description {
	    Format of the help to generate.
	    This field is fed by the options --by-category, --full, --list, and --short.
	} documented yes flags {} generator {} interactive no isbool 0 label format arglabel format list no ordered 0 presence no prompt {Enter format: } required 1 threshold {} type state validator ::cmdr::validate::identity} full {cmdline 1 code ? default no defered 0 description {
		Activate full form of the help.
	    } documented yes flags {--full primary} generator {} interactive no isbool 1 label full arglabel full list no ordered 0 presence yes prompt {Enter full: } required 0 threshold {} type option validator ::cmdr::validate::boolean} list {cmdline 1 code ? default no defered 0 description {
		Activate list form of the help.
	    } documented yes flags {--list primary} generator {} interactive no isbool 1 label list arglabel list list no ordered 0 presence yes prompt {Enter list: } required 0 threshold {} type option validator ::cmdr::validate::boolean} no-pager {cmdline 1 code ? default no defered 0 description {
	    Disable use of paging.
	} documented yes flags {--no-pager primary} generator {} interactive no isbool 1 label no-pager arglabel no-pager list no ordered 0 presence yes prompt {Enter no-pager: } required 0 threshold {} type option validator ::cmdr::validate::boolean} short {cmdline 1 code ? default no defered 0 description {
		Activate short form of the help.
	    } documented yes flags {--short primary} generator {} interactive no isbool 1 label short arglabel short list no ordered 0 presence yes prompt {Enter short: } required 0 threshold {} type option validator ::cmdr::validate::boolean} width {cmdline 1 code ? default {} defered 0 description {
	    The line width to format the help for.
	    Defaults to the terminal width, or 80 when
	    no terminal is available.
	} documented yes flags {-w alias --width primary} generator {::apply {p { linenoise columns }}} interactive no isbool 0 label width arglabel width list no ordered 0 presence no prompt {Enter width: } required 0 threshold {} type option validator ::cmdr::validate::integer}} sections *AutoGenerated* action {::cmdr::help::auto-help ::x}} exit {desc {Exit the shell.
		    No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections *AutoGenerated* action {ZZZ::my shell-exit}} {} {desc TEST options {} opt2para {} arguments {} states {} parameters {} sections {}}}

# # ## ### ##### ######## ############# #####################

test cmdr-help-2.0 {full - formatting help structure} -body {
    HelpLarge full
} -result {bar aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii
................................................................................
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

bar exit
    Exit the shell. No-op if not in a shell.

bar

snafu aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii

    --lulu    loop
    --no-lulu Complementary alias of --lulu.

................................................................................
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

snafu exit
    Exit the shell. No-op if not in a shell.

snafu

tool pliers help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

tool pliers exit
    Exit the shell. No-op if not in a shell.

tool pliers

tool hammer nail [OPTIONS] [<supply>...]
    workbench

    --driver DRIVER force
    --force DRIVER  Alias of --driver.

    supply magazine

tool hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

tool hammer exit
    Exit the shell. No-op if not in a shell.

tool hammer

tool help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

tool exit
    Exit the shell. No-op if not in a shell.

tool

hammer nail [OPTIONS] [<supply>...]
    workbench

    --driver DRIVER force
    --force DRIVER  Alias of --driver.

    supply magazine

hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

hammer exit
    Exit the shell. No-op if not in a shell.

hammer

help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

exit
    Exit the shell. No-op if not in a shell.


    TEST}

test cmdr-help-2.1 {full formatting - help structure, inverted boolean option} -body {
    HelpSmall full
} -result {nail [OPTIONS]
    workbench

    --driver    Complementary alias of
................................................................................
    Without arguments help for all commands is
    given. The default format is --full.

    --by-category Activate by-category form of the
                  help.
    --full        Activate full form of the help.
    --list        Activate list form of the help.
    --no-pager    Disable use of paging.
    --short       Activate short form of the help.
    --width WIDTH The line width to format the
                  help for. Defaults to the
                  terminal width, or 80 when no
                  terminal is available.
    -w WIDTH      Alias of --width.

    cmdname The entire command line, the name of
            the command to get help for. This can
            be several words.

exit
    Exit the shell. No-op if not in a shell.


    TEST}

# # ## ### ##### ######## ############# #####################

test cmdr-help-3.0 {short - formatting help structure} -body {
    HelpLarge short
} -result {bar aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii
................................................................................
bar help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

bar exit
    Exit the shell. No-op if not in a shell.

bar

snafu aloha [OPTIONS] <yoyo> [<jump>] <run>...
    hawaii

snafu help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

snafu exit
    Exit the shell. No-op if not in a shell.

snafu

tool pliers help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

tool pliers exit
    Exit the shell. No-op if not in a shell.

tool pliers

tool hammer nail [OPTIONS] [<supply>...]
    workbench

tool hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

tool hammer exit
    Exit the shell. No-op if not in a shell.

tool hammer

tool help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

tool exit
    Exit the shell. No-op if not in a shell.

tool

hammer nail [OPTIONS] [<supply>...]
    workbench

hammer help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

hammer exit
    Exit the shell. No-op if not in a shell.

hammer

help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

exit
    Exit the shell. No-op if not in a shell.


    TEST}

test cmdr-help-3.1 {short formatting - help structure, inverted boolean option} -body {
    HelpSmall short
} -result {nail [OPTIONS]
    workbench

help [OPTIONS] [<cmdname>...]
    Retrieve help for a command or command set.
    Without arguments help for all commands is
    given. The default format is --full.

exit
    Exit the shell. No-op if not in a shell.


    TEST}

# # ## ### ##### ######## ############# #####################

test cmdr-help-4.0 {list - formatting help structure} -body {
    HelpLarge list
} -result {    bar aloha [OPTIONS] <yoyo> [<jump>] <run>...
    bar help [OPTIONS] [<cmdname>...]
    bar exit
    bar
    snafu aloha [OPTIONS] <yoyo> [<jump>] <run>...
    snafu help [OPTIONS] [<cmdname>...]
    snafu exit
    snafu
    tool pliers help [OPTIONS] [<cmdname>...]
    tool pliers exit
    tool pliers
    tool hammer nail [OPTIONS] [<supply>...]
    tool hammer help [OPTIONS] [<cmdname>...]
    tool hammer exit
    tool hammer
    tool help [OPTIONS] [<cmdname>...]
    tool exit
    tool
    hammer nail [OPTIONS] [<supply>...]
    hammer help [OPTIONS] [<cmdname>...]
    hammer exit
    hammer
    help [OPTIONS] [<cmdname>...]
    exit}

test cmdr-help-4.1 {list formatting - help structure, inverted boolean option} -body {
    HelpSmall list
} -result {    nail [OPTIONS]
    help [OPTIONS] [<cmdname>...]
    exit}

# # ## ### ##### ######## ############# #####################
return

Changes to tests/officer.tests.

260
261
262
263
264
265
266
267
268
269
270
	common KEY -bogus DATA
    }
} -body {
    x known
} -cleanup {
    x destroy
} -returnCodes error \
    -result {Unknown option "-bogus", expected -extend}

# # ## ### ##### ######## ############# #####################
return







|



260
261
262
263
264
265
266
267
268
269
270
	common KEY -bogus DATA
    }
} -body {
    x known
} -cleanup {
    x destroy
} -returnCodes error \
    -result {Unknown option "-bogus", expected -extend, or --}

# # ## ### ##### ######## ############# #####################
return

Changes to tests/support.tcl.

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
	} ::wall
    } $format $n
}

proc Help {def format n} {
    try {
	cmdr create x foo $def
	cmdr help format $format x $n [x help]
    } finally {
	x destroy
    }
}

# # ## ### ##### ######## ############# #####################
## Supporting procedures for cmdr.test et. al.







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
	} ::wall
    } $format $n
}

proc Help {def format n} {
    try {
	cmdr create x foo $def
	string trimright [cmdr help format $format x $n [x help]] \n
    } finally {
	x destroy
    }
}

# # ## ### ##### ######## ############# #####################
## Supporting procedures for cmdr.test et. al.