clap/examples
2022-03-14 09:43:17 -05:00
..
derive_ref docs(derive): Builder/Derive interop reference (#3515) 2022-03-07 14:43:51 -06:00
tutorial_builder docs(tutorial): Prefer custom parsing to validation 2022-03-14 09:31:40 -05:00
tutorial_derive docs(tutorial): Prefer custom parsing to validation 2022-03-14 09:31:40 -05:00
cargo-example-derive.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
cargo-example-derive.rs docs(examples): Add missing feature flag reqs 2022-02-11 07:07:03 -06:00
cargo-example.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
cargo-example.rs docs: Update to new command! macro 2022-02-15 08:54:59 -06:00
demo.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
demo.rs docs(examples): Steer people to know about about vs long_about 2022-01-10 18:47:24 -06:00
escaped-positional-derive.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
escaped-positional-derive.rs docs(examples): Steer people to know about about vs long_about 2022-01-10 18:47:24 -06:00
escaped-positional.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
escaped-positional.rs docs: Update to new command! macro 2022-02-15 08:54:59 -06:00
git-derive.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
git-derive.rs feat: Replace core set of AppSettings with functions 2022-02-11 12:35:09 -06:00
git.md docs: Fix messed up highlighting 2022-01-05 11:53:06 -06:00
git.rs docs: Update App references to Command 2022-02-14 15:33:49 -06:00
multicall-busybox.md docs: Update App references to Command 2022-02-14 15:33:49 -06:00
multicall-busybox.rs refactor: Update app variables to cmd 2022-02-14 15:55:56 -06:00
multicall-hostname.md docs: Update App references to Command 2022-02-14 15:33:49 -06:00
multicall-hostname.rs refactor: Update app variables to cmd 2022-02-14 15:55:56 -06:00
pacman.md fix(help): Use standard alternate syntax for subcommands 2022-02-14 21:18:33 -06:00
pacman.rs docs: Update App references to Command 2022-02-14 15:33:49 -06:00
README.md docs(examples): Generalize key-value example 2022-03-14 09:38:04 -05:00
typed-derive.md docs(examples): Show implicit parser 2022-03-14 09:43:17 -05:00
typed-derive.rs docs(examples): Show implicit parser 2022-03-14 09:43:17 -05:00

Examples

  • Basic demo: derive
  • Typed arguments: derive
    • Topics:
      • Custom parse()
  • Custom cargo command: builder, derive
    • Topics:
      • Subcommands
      • Cargo plugins
  • git-like interface: builder, derive
    • Topics:
      • Subcommands
      • External subcommands
  • pacman-like interface: builder
    • Topics:
      • Flag subcommands
      • Conflicting arguments
  • Escaped positionals with --: builder, derive
  • Multi-call
    • busybox: builder
      • Topics:
        • Subcommands
    • hostname: builder
      • Topics:
        • Subcommands

Contributing

New examples:

  • Building: They must be added to Cargo.toml with the appropriate required-features.
  • Testing: Ensure there is a markdown file with trycmd syntax
  • Link the .md file from here

See also the general CONTRIBUTING.