mikehoyle
50b3d2966e
Correct README syntax for bool flag ( #3346 )
...
The proper syntax for the attribute is "parse" not "parser".
2022-01-26 08:41:09 -06:00
Ed Page
f32d640d49
docs(tutorial): Talk about required/optional subcommands
...
Inspired by https://github.com/clap-rs/clap/discussions/3342
Looks like we already cover this in the derive reference.
2022-01-25 09:39:14 -06:00
omjadas
86c83d296f
feat: Add default_value_os_t ( #3333 )
...
The order of suffixes allows us to preserve the original builder function name.
This is a part of #2813
2022-01-24 15:32:21 -06:00
Ed Page
ddad3a7923
docs(derive): Clarify from_flag's interactions
2022-01-20 09:55:13 -06:00
Ed Page
63a36673e1
docs(derive): Link ref to tutorial / examples
2022-01-11 14:27:39 -06:00
Ed Page
6b3248fff1
docs(derive): Link tutorial to reference
2022-01-11 14:22:54 -06:00
Ed Page
4b51b8e253
docs(examples): Steer people to know about about vs long_about
...
`#[clap(about)]` only overrides `about`. If the doc comment also sets
`long_about`, it won't be overridden. This change is to help raise
visibility of reseting `long_about` in these cases.
2022-01-10 18:47:24 -06:00
Ed Page
64d16bbc03
docs(derive): Clarify which Cargo.toml field is read
2022-01-10 18:32:32 -06:00
Ed Page
c5ace9aaa6
docs(derive): Clarify what can be used with flatten
2022-01-10 08:03:59 -06:00
Ed Page
fe56bb112d
doc(derive): Clarify need to do long_about = None
2022-01-10 07:25:54 -06:00
Hugo Osvaldo Barrera
7110401595
docs: Fix messed up highlighting
...
This just affects how it's rendered; rather than attempting to highlight
these blocks as a shell script, they'll get highlighted as console
output.
See the rendered versions for a better comparison.
2022-01-05 11:53:06 -06:00
Daniel Eades
2986a9eee0
style: remove unnecessary lazy evaluations
2022-01-04 09:20:17 -06:00
Ed Page
b0cb2057ea
docs(derive): Include name magic attribute
...
Inspired by #3242l
2022-01-03 06:33:53 -06:00
Ed Page
3bb33387af
docs(derive): Remove redundant setting
2022-01-01 19:51:17 -06:00
Ed Page
f596bb3ce8
docs(tutorial): Fix another internal link
2021-12-29 18:07:11 -06:00
Emiel Van Severen
657f32a59b
Fix broken internal link
2021-12-30 01:00:29 +01:00
迷渡
9faec11b84
docs: Fix link to 'Configuring the Parser'
...
Signed-off-by: 迷渡 <justjavac@gmail.com>
2021-12-24 12:41:09 +08:00
Ed Page
3db09f4dd4
fix: Don't panic on lack of conflicts
...
Fixes #3197
2021-12-23 13:38:23 -06:00
Ed Page
a37f2908c8
docs(derive): Looks like optional isnt supported
...
According to #2587
2021-12-23 10:29:34 -06:00
Ed Page
653617d0fd
docs(derive): Add flatten/subcommand for variants
2021-12-23 10:27:07 -06:00
Ed Page
5643dddf3e
docs(tutorial): Encourage App::debug_assert
2021-12-23 08:41:52 -06:00
Ed Page
efca08341a
docs(tutorial): Fix derive anchor links
2021-12-23 08:23:32 -06:00
迷渡
c60d5dd1f0
docs: Fix anchor links
2021-12-23 10:58:14 +08:00
Ed Page
8924dd7a1e
feat(derive): Don't require Display
for default ArgEnum
...
While I'm unsure how much type specialization we should do, we
intentionally have the `arg_enum` attribute for doing special behavior
based on it, so let's take advantage of it.
Fixes #3185
2021-12-16 09:11:32 -06:00
Ed Page
aa270f6aca
docs(examples): Add cargo subcommand example
2021-12-15 12:07:29 -06:00
Ed Page
03cb509d6c
refactor(examples): Change naming style
...
This is to make room for a reasonable looking cargo plugin example.
I got lazy and didn't update the tutorials.
2021-12-15 11:12:18 -06:00
Ed Page
9e64387ef0
revert(help): Partial revert of 3c049b4
...
The extra whitespace was targeted at machine processing for a subset of
users for a subset of runs of CLIs. On the other hand, there is a lot
of concern over the extra verbose output.
A user can set the help template for man, if desired. They can even do
something (env? feature flag?) to make it only run when doing man
generation. We also have #3174 in the works.
So let's focus on the end-user reading `--help`. People wanting to use
`help2man` have workarounds to do what they need.
Fixes #3096
2021-12-15 10:36:59 -06:00
Ed Page
b0f1750e81
Merge pull request #3041 from fishface60/master
...
Rewrite Multicall handling to just strip path off argv0
2021-12-13 09:21:59 -06:00
p4tr1ck
f3afcee855
examples: Fix typo
2021-12-13 22:34:08 +08:00
DerZade
7c60180e24
docs: Fix copy paste error in example
2021-12-13 11:41:12 +01:00
Richard Maw
38b9645bed
fix: Windows Multicall support
...
The executable suffix is unconditionally stripped off the file path
so that the file name matches subcommands names
without having to add the EXE suffix on different platforms.
2021-12-12 22:08:25 +00:00
Richard Maw
17c64ef42b
fix: Example typo
2021-12-12 22:08:25 +00:00
Richard Maw
e3d355fa85
feat: Make Multicall just strip dir from argv0
2021-12-12 22:08:25 +00:00
Hiroaki ITO
c2dc425784
docs: Fix the pacman-like interface example link
2021-12-11 22:22:09 +09:00
Ed Page
cf93d7c75a
docs: Fix example output
...
How did #3112 get merged?
2021-12-09 10:26:01 -06:00
Ed Page
7731ca2d21
docs(derive): Show how to override special types
...
Fixes #3107
2021-12-09 09:32:33 -06:00
Ed Page
367879ac2a
docs: Fix reference to feature flags
2021-12-08 19:25:48 -06:00
Ed Page
32b5520ff1
docs: Call out features used in root examples
...
mitsuhiko immediately jumped into the examples and got tripped up by the
lack of documentation on feature flags needed.
I limited this to just the root ones because the rest are in a more
proper tutorial that steps through it all.
2021-12-08 16:46:49 -06:00
Pavan Kumar Sunkara
6ae804d084
Merge pull request #3082 from epage/fixes
...
Misc fixes from clapng fork review
2021-12-08 04:08:49 +00:00
Ed Page
76828fada8
docs: Guide people to missing_docs lint
2021-12-07 21:22:12 -06:00
Ed Page
8708c54e5a
Merge pull request #3081 from clap-rs/pksunkara-patch-1
...
docs: Link correct example
2021-12-07 21:11:07 -06:00
Pavan Kumar Sunkara
c98d8aac13
docs: Link correct example
2021-12-08 01:27:18 +00:00
Ed Page
c99adcc6c9
docs: Add key-value derive example
...
This is carried over from the clap_derive examples. Looking over the
other examples, I feel like they are covered by other examples or by the
derive reference. We should call out deny missing docs though.
2021-12-07 19:01:55 -06:00
Ed Page
55186f5aa3
docs: Highlight subxcommand help heading
2021-12-07 17:45:57 -06:00
Ed Page
92750c6aa5
docs: Simplify demo
2021-12-07 17:45:57 -06:00
Ed Page
6da9277522
docs(derive): Note Option Vec behavior
2021-12-07 17:45:57 -06:00
Ed Page
b2836c07a7
fix: Gracefully handle empty authors
2021-12-06 11:30:26 -06:00
Ed Page
f517c0ede1
docs: Remove author fields
2021-12-06 11:24:23 -06:00
Ed Page
27acb95cd9
docs: Add Derive API reference
...
I took more inspiration for organization from `serde.rs` than `docs.rs/structopt`.
2021-12-01 21:23:06 -06:00
Ed Page
7f8b1990bb
docs: Iterate on examples from writing ref docs
2021-12-01 14:30:51 -06:00