clap/examples/21_aliases.md
Ed Page bfa02fd418 test: More thoroughly test examples
This ports our example testing over to [trycmd](https://docs.rs/) so
we can:
- More thoroughly test our examples
- Provide always-up-to-date example usage

The old way of testing automatically picked up examples.  This new way
requires we have a `.md` file that uses the example in some way.

Notes:
- Moved overall example description to the `.md` file
- I added cross-linking between related examples
- `14_groups` had a redundant paragraph (twice talked about "one and
  only one"
2021-11-23 13:13:41 -06:00

20 lines
383 B
Markdown

Subcommands can also have aliases
```
$ 21_aliases --help
MyApp
USAGE:
21_aliases[EXE] [SUBCOMMAND]
OPTIONS:
-h, --help Print help information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
ls Adds files to myapp
$ 21_aliases ls .
'myapp add' was used, input is: .
$ 21_aliases dir .
'myapp add' was used, input is: .
```