summaryrefslogtreecommitdiffstats
path: root/third_party/rust/clap/examples/README.md
blob: 42ba88991a50649a2b8a52ecde770d61b2ae8b2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Examples

- Basic demo: [derive](demo.md)
- Typed arguments: [derive](typed-derive.md)
  - Topics:
    - Custom `parse()`
- Custom cargo command: [builder](cargo-example.md), [derive](cargo-example-derive.md)
  - Topics:
    - Subcommands
    - Cargo plugins
- git-like interface: [builder](git.md), [derive](git-derive.md)
  - Topics:
    - Subcommands
    - External subcommands
    - Optional subcommands
    - Default subcommands
- pacman-like interface: [builder](pacman.md)
  - Topics:
    - Flag subcommands
    - Conflicting arguments
- Escaped positionals with `--`: [builder](escaped-positional.md), [derive](escaped-positional-derive.md)
- Multi-call
  - busybox: [builder](multicall-busybox.md)
    - Topics:
      - Subcommands
  - hostname: [builder](multicall-hostname.md)
    - Topics:
      - Subcommands
- repl: [builder](repl.rs)
  - Topics:
    - Read-Eval-Print Loops / Custom command lines

## Contributing

New examples:
- Building: They must be added to [Cargo.toml](../../Cargo.toml) with the appropriate `required-features`.
- Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax
- Link the `.md` file from here

See also the general [CONTRIBUTING](../CONTRIBUTING.md).