1 Git is an example of several common subcommand patterns.
8 A fictional versioning CLI
14 -h, --help Print help information
19 help Print this message or the help of the given subcommand(s)
25 A fictional versioning CLI
31 -h, --help Print help information
36 help Print this message or the help of the given subcommand(s)
45 git[EXE] add <PATH>...
48 <PATH>... Stuff to add
51 -h, --help Print help information
63 git[EXE] add <PATH>...
66 <PATH>... Stuff to add
69 -h, --help Print help information
71 $ git add Cargo.toml Cargo.lock
72 Adding ["Cargo.toml", "Cargo.lock"]
82 git[EXE] stash [OPTIONS]
83 git[EXE] stash <SUBCOMMAND>
86 -h, --help Print help information
87 -m, --message <MESSAGE>
91 help Print this message or the help of the given subcommand(s)
99 git[EXE] stash push [OPTIONS]
102 -h, --help Print help information
103 -m, --message <MESSAGE>
109 git[EXE] stash pop [STASH]
115 -h, --help Print help information
117 $ git stash -m "Prototype"
118 Pushing Some("Prototype")
123 $ git stash push -m "Prototype"
124 Pushing Some("Prototype")
131 External subcommands:
133 $ git custom-tool arg1 --foo bar
134 Calling out to "custom-tool" with ["arg1", "--foo", "bar"]