Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Updated tests to match the new auto-exit command. |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
48291542b349a9e05bfd9455a86aba52 |
User & Date: | aku 2014-02-06 06:00:17.855 |
Context
2014-02-06
| ||
06:18 | Remade "help::query-actor" as method "find" of officers and private. Simplified the internals of auto-help. Provides the path lookup to framework users as well. Updated the documentation. check-in: 5487358492 user: aku tags: trunk | |
06:00 | Updated tests to match the new auto-exit command. check-in: 48291542b3 user: aku tags: trunk | |
05:35 | Added utility package cmdr::help::tcl, dumping the help as Tcl data structure. Like cmdr::help::json, with less overhead to read into other Tcl code. check-in: 865912b8d9 user: aku tags: trunk | |
Changes
Changes to tests/help.tests.
︙ | ︙ | |||
72 73 74 75 76 77 78 | 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. | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 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 {} 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 {} 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 {} 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 {} 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 {} 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 {} 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 {} 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 {} 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. |
︙ | ︙ | |||
105 106 107 108 109 110 111 | 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. | | > | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | 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 {} 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 {} 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. |
︙ | ︙ | |||
138 139 140 141 142 143 144 | 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. | | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | 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 {} 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 {} 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. |
︙ | ︙ | |||
204 205 206 207 208 209 210 | 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. | | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | 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 {} action {::cmdr::help::auto-help ::x}} exit {desc {Exit the shell. No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections {} 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 } |
︙ | ︙ | |||
316 317 318 319 320 321 322 | 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. | | > | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | 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 {} action {::cmdr::help::auto-help ::x}} exit {desc {Exit the shell. No-op if not in a shell.} options {} opt2para {} arguments {} states {} parameters {} sections {} action {::oo::Obj972::my shell-exit}}} # # ## ### ##### ######## ############# ##################### test cmdr-help-2.0 {full - formatting help structure} -body { HelpLarge full } -result {bar aloha [OPTIONS] <yoyo> [<jump>] <run>... hawaii |
︙ | ︙ | |||
352 353 354 355 356 357 358 359 360 361 362 363 364 365 | 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 aloha [OPTIONS] <yoyo> [<jump>] <run>... hawaii --lulu loop --no-lulu Complementary alias of --lulu. yoyo height | > > > | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | 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. yoyo height |
︙ | ︙ | |||
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 | 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 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 nail [OPTIONS] [<supply>...] workbench --driver force --force Alias of --driver. supply magazine | > > > > > > | 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 | 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 |
︙ | ︙ | |||
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 | 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 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 nail [OPTIONS] [<supply>...] workbench --driver force --force Alias of --driver. supply magazine | > > > > > > | 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 | 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 |
︙ | ︙ | |||
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 | 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. 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. } test cmdr-help-2.1 {full formatting - help structure, inverted boolean option} -body { HelpSmall full } -result {nail [OPTIONS] workbench | > > > > > > | 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 | 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 |
︙ | ︙ | |||
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 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | 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. } # # ## ### ##### ######## ############# ##################### 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. 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. 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 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 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 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. help [OPTIONS] [<cmdname>...] Retrieve help for a command or command set. Without arguments help for all commands is given. The default format is --full. } 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. } # # ## ### ##### ######## ############# ##################### test cmdr-help-4.0 {list - formatting help structure} -body { HelpLarge list } -result { bar aloha [OPTIONS] <yoyo> [<jump>] <run>... bar help [OPTIONS] [<cmdname>...] snafu aloha [OPTIONS] <yoyo> [<jump>] <run>... snafu help [OPTIONS] [<cmdname>...] tool pliers help [OPTIONS] [<cmdname>...] tool hammer nail [OPTIONS] [<supply>...] tool hammer help [OPTIONS] [<cmdname>...] tool help [OPTIONS] [<cmdname>...] hammer nail [OPTIONS] [<supply>...] hammer help [OPTIONS] [<cmdname>...] | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > | > | 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 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 | 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 |
Changes to tests/main.tests.
︙ | ︙ | |||
36 37 38 39 40 41 42 | cmdr create OBJ NAME SPEC X } -returnCodes error \ -result {wrong # args: should be "cmdr create obj name spec"} # # ## ### ##### ######## ############# ##################### ## Basic officer, knows nothing. create/new with proper arguments. | | | | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | cmdr create OBJ NAME SPEC X } -returnCodes error \ -result {wrong # args: should be "cmdr create obj name spec"} # # ## ### ##### ######## ############# ##################### ## Basic officer, knows nothing. create/new with proper arguments. test cmdr-main-2.0 {new, nothing but auto-help and -exit} -setup { set x [cmdr new foo {}] } -body { list [$x known] [$x hasdefault] } -cleanup { $x destroy unset x } -result {{help exit} 0} test cmdr-main-2.1 {create, nothing but auto-help and -exit} -setup { cmdr create x foo {} } -body { list [x known] [x hasdefault] } -cleanup { x destroy } -result {{help exit} 0} # # ## ### ##### ######## ############# ##################### return |
Changes to tests/officer.tests.
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 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 | x destroy } -result { foo = { description: 'TEST' default: bar store (K): 'D' bar --> bar help --> help pliers --> pliers snafu --> bar tool --> tool } foo bar = { description: '' no default store (K): 'D' help --> help } foo tool = { description: '' default: pliers store (K): 'D' store (U): 'V' hammer --> hammer help --> help pliers --> pliers } foo tool hammer = { description: '' no default store (K): 'D' store (U): 'V' help --> help } foo tool pliers = { description: '' no default store (K): 'D' store (U): 'V' help --> help } } # # ## ### ##### ######## ############# ##################### ## Error cases of the action DSL. | > > > > > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 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 | x destroy } -result { foo = { description: 'TEST' default: bar store (K): 'D' bar --> bar exit --> exit help --> help pliers --> pliers snafu --> bar tool --> tool } foo bar = { description: '' no default store (K): 'D' exit --> exit help --> help } foo tool = { description: '' default: pliers store (K): 'D' store (U): 'V' exit --> exit hammer --> hammer help --> help pliers --> pliers } foo tool hammer = { description: '' no default store (K): 'D' store (U): 'V' exit --> exit help --> help } foo tool pliers = { description: '' no default store (K): 'D' store (U): 'V' exit --> exit help --> help } } # # ## ### ##### ######## ############# ##################### ## Error cases of the action DSL. |
︙ | ︙ |