mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
bfa02fd418
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"
15 lines
462 B
Markdown
15 lines
462 B
Markdown
Once all App settings (including all arguments) have been set, you call get_matches() which
|
|
parses the string provided by the user, and returns all the valid matches to the ones you
|
|
specified.
|
|
|
|
For example:
|
|
```bash
|
|
$ 04_using_matches input
|
|
Doing real work with file: input
|
|
$ 04_using_matches input --debug
|
|
Debugging is turned on
|
|
Doing real work with file: input
|
|
$ 04_using_matches input --config path
|
|
Using config file: path
|
|
Doing real work with file: input
|
|
```
|