mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
docs: Describe the example we show
This also provides us another opportunity to link to the docs.
This commit is contained in:
parent
5877f884f1
commit
3468325b8d
2 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,7 @@ pre-release-replacements = [
|
||||||
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
|
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
|
||||||
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
|
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
|
||||||
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1},
|
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1},
|
||||||
{file="README.md", search="github.com/clap-rs/clap/blob/[^/]+/", replace="github.com/clap-rs/clap/blob/{{tag_name}}/", exactly=9, prerelease = true},
|
{file="README.md", search="github.com/clap-rs/clap/blob/[^/]+/", replace="github.com/clap-rs/clap/blob/{{tag_name}}/", exactly=10, prerelease = true},
|
||||||
{file="README.md", search="version = \"[a-z0-9\\.-]+\"", replace="version = \"{{version}}\"", exactly=1, prerelease = true},
|
{file="README.md", search="version = \"[a-z0-9\\.-]+\"", replace="version = \"{{version}}\"", exactly=1, prerelease = true},
|
||||||
{file="src/derive.rs", search="github.com/clap-rs/clap/blob/[^/]+/", replace="github.com/clap-rs/clap/blob/{{tag_name}}/", exactly=4, prerelease = true},
|
{file="src/derive.rs", search="github.com/clap-rs/clap/blob/[^/]+/", replace="github.com/clap-rs/clap/blob/{{tag_name}}/", exactly=4, prerelease = true},
|
||||||
]
|
]
|
||||||
|
|
|
@ -31,6 +31,10 @@ Create your command-line parser, with all of the bells and whistles, declarative
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
This uses our
|
||||||
|
[Derive API](https://github.com/clap-rs/clap/blob/v3.0.10/examples/derive_ref/README.md)
|
||||||
|
which provides access to the Builder API as attributes on a `struct`:
|
||||||
|
|
||||||
<!-- Copied from examples/demo.{rs,md} -->
|
<!-- Copied from examples/demo.{rs,md} -->
|
||||||
```rust,no_run
|
```rust,no_run
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
Loading…
Reference in a new issue