Expand description
The .help text, ported from the reference shell’s own tables.
Invariant: every command described here exists, and is described in the
reference’s own words. Help is the one part of a shell a person reads
instead of testing, so an entry copied for a command that was never built
would be believed; and an entry reworded would make .help .mode a
different page from the one it is compared against.
Two tables and one search, all three of them shell.c’s. HELP is
azHelp[]: one entry per dot-command, its first line the summary the
bare .help prints and the indented lines after it the detail a search
that matched exactly one command prints. An entry beginning with ,
rather than . is an undocumented command - it is left out of the
summary listing and out of .help -all, and .help 0 is the only thing
that shows it. USAGE is aUsage[], the long-form text four commands
carry instead of their detail lines.
The entries are the reference’s own words, and only for the commands
this shell actually has. Help that described a command that is not here
would be a worse answer than no help at all, and the reference’s wording
is the point: .help .mode is compared byte for byte.
Constants§
- HELP
- Every dot-command this shell has, as
azHelp[]holds them. - USAGE
- The long-form usage text, as
aUsage[]holds it.
Functions§
- show_
help - Writes the help a pattern asks for, and returns how many commands matched.