Skip to main content

command

Function command 

Source
pub fn command() -> Command
Expand description

The command tree this binary parses with, and the one every reader takes.

Cli::command is the derived half and carries the grammar alone. This function is what puts the words on it, and every word it puts there comes out of headwater_verbs::VERBS: the group headings and the one-line summary of the first screen, the long description a verb prints for itself, and the same pair for each second word.

main prints help through this and tests/verbs.rs walks it, so a reader of the help and a reader of the test meet the same tree. A caller that used Cli::command directly would meet a tree with no prose on it at all.