tree: 4b970478d7961985f49b50f3147b521a1f79ab4d [path history] [tgz]
  1. derive_ref/
  2. tutorial_builder/
  3. tutorial_derive/
  4. cargo-example-derive.md
  5. cargo-example-derive.rs
  6. cargo-example.md
  7. cargo-example.rs
  8. demo.md
  9. demo.rs
  10. escaped-positional-derive.md
  11. escaped-positional-derive.rs
  12. escaped-positional.md
  13. escaped-positional.rs
  14. git-derive.md
  15. git-derive.rs
  16. git.md
  17. git.rs
  18. multicall-busybox.md
  19. multicall-busybox.rs
  20. multicall-hostname.md
  21. multicall-hostname.rs
  22. pacman.md
  23. pacman.rs
  24. README.md
  25. repl.rs
  26. typed-derive.md
  27. typed-derive.rs
android/vendor/clap-3.2.6/examples/README.md

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
      • Optional subcommands
      • Default subcommands
  • pacman-like interface: builder
    • Topics:
      • Flag subcommands
      • Conflicting arguments
  • Escaped positionals with --: builder, derive
  • Multi-call
  • repl: builder
    • Topics:
      • Read-Eval-Print Loops / Custom command lines

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.