Ed Page
8cc164dafb
fix!: Remove lifetime from PossibleValue
...
Another step towards #1041
This isn't the long term type for `PossibleValue::help`, I just wanted
to get the lifetime out of the way first before figuring out how help
will work.
2022-08-19 12:44:29 -05:00
Ed Page
43e961d24f
style: Address clippy
2022-08-11 16:07:58 -05:00
Ed Page
64639aa81c
style: Make clippy happy
2022-08-10 11:41:27 -05:00
Ed Page
8ed35b4d9f
fix: Provide convenient access for common cases
2022-08-05 12:06:54 -05:00
Ed Page
32f308d4ef
fix!: Make is_multiple_values private
...
multiple_values is now just book keeping for the builder, instead people
should look to actions and `num_args`.
The meaning for it was a little weird anyways.
2022-08-04 15:21:10 -05:00
Ed Page
6e1ca59ec1
fix!: Make is_takes_value_set private
...
At this point, it is an implementation detail to help with book keeping
within the builder.
2022-08-04 14:44:14 -05:00
Ed Page
52ec1f92e9
fix: Clarify that get_num_args
is safe to call
...
The only time it won't be initialized is before `_build`. This is possible because
of #4027
I wish I could just put the `expect` inside the call but I'm worried
about allowing people to build stuff on top of clap.
2022-08-04 14:21:53 -05:00
Ed Page
ba15b5f430
fix!: Rename Arg::number_of_values to Arg::num_args
2022-08-03 14:45:47 -05:00
Ed Page
76bff6f34e
fix!: Remove rest of deprecated APIs
...
Fixes #4009
2022-08-01 15:21:33 -05:00
Ed Page
41535d5c46
feat: Extend number_of_values
to support min/max per occurrence
2022-07-28 16:52:25 -05:00
Ed Page
6f03b4f948
fix!: Remove multiple occurrences in favor of Append/Count
...
For num_vals and friends, this only implements hacks until #2688
Fixes #3021
2022-07-25 13:23:43 -05:00
Ed Page
fbd6e19f05
fix(complete)!: Remove deprecated Shell::possible_values
2022-07-21 15:40:40 -05:00
Ed Page
ff0796b014
fix(derive)!: Remove old derive names
2022-07-21 12:57:12 -05:00
Ed Page
9e38353442
fix(derive): Clarify ArgEnum as ValueEnum
...
We aren't enumerating arguments but values for an argument, so the name
should reflect that.
This will be important as part of #1807 when we have more specific
attribute names.
2022-06-08 11:14:09 -05:00
Ed Page
14a62e11fd
fix(parser): Deprecate multiple_occurrences
...
Fixes #3772
2022-06-08 09:54:23 -05:00
Ed Page
256643f8d3
fix: Deprecate possible_values
2022-05-25 12:57:11 -05:00
Ed Page
f3d8ef248f
feat(complete): Complete value_parser possible values
2022-05-16 15:08:47 -05:00
Ed Page
b266e6d35d
fix(complete): Complete visible, rather than hidden, values
...
In a refactor for #3503 , one of the checks for `is_hide_set` got flipped
and we are completing hidden `PossibleValue`s rather than visible.
Fixes #3697
2022-05-06 09:14:32 -05:00
Roland Fredenhagen
33949ce4de
feat(help): Show PossibleValue help in --help
( #3503 )
...
`-h` (short help) still shows the same.
This gates it behind an `unstable-v4` feature flag to avoid disrupting users who set the help without knowing where all it shows up (particularly derive users where `ArgEnum` is automatically extracting the help).
Fixes #3312
2022-03-02 09:15:28 -06:00
Ed Page
e8010e79a9
refactor: Update app variables to cmd
2022-02-14 15:55:56 -06:00
Ed Page
c4144d7d6c
docs: Update App references to Command
2022-02-14 15:33:49 -06:00
Gibson Fahnestock
6f36ca3a25
fix(complete): escape fish possible values
...
Fixes: https://github.com/clap-rs/clap/issues/3467
2022-02-14 20:58:57 +00:00
Ed Page
1e4ec5f4f0
fix: Deprecation warnings
2022-02-11 15:59:03 -06:00
Ed Page
d3f5d7ce34
fix: Clarify Arg/ArgGroup id's role
...
This adjusts names. Adjusting the derive naming (and re-naming) is left
to #2475 .
Fixes #3335
2022-02-11 14:11:50 -06:00
Ed Page
9bd7060089
fix: Deprecate various APIs
...
- ArgSettings are part of #2717
- Errors are part of #2628
- `help_heading` is part of #1807 and #1553
- Some misc parts are for API consistency
2022-02-10 19:37:47 -06:00
Ed Page
47d76742eb
feat: Add Arg
getters for all settings
...
This is prep for #2717
2022-02-10 10:18:41 -06:00
Haim Ashkenazi
bf98b1bded
Allow completion of partial commands
...
Based on solution suggested here by @benedictleejh:
https://github.com/clap-rs/clap/issues/2750
2022-02-05 16:49:21 +02:00
Ed Page
b488aab46c
fix: Clarify some unwraps as expects
...
This was inspiredby #3322
2022-01-21 08:27:18 -06:00
Clifton King
658b7a0841
fix(complete): Fix unescaped single quotes in zsh
...
help strings for subcomand args did not escape single quotes
2022-01-15 14:33:11 -06:00
cherryblossom
6d27488602
fix(complete): Use Elvish v0.17 lambda syntax
...
[Elvish v0.17][1] deprecated the old lambda syntax (`[arg1 arg2] { body }`)
in favour of the new `{|arg1 arg2| body }` syntax. This commit uses the
new syntax to stop deprecation warnings.
[1]: https://elv.sh/blog/0.17.0-release-notes.html#deprecated-features
2022-01-12 11:58:18 +11:00
xylous
e2f4d2827e
fix(complete): Add newline at end of zsh output
2022-01-09 19:51:18 +02:00
Daniel Eades
7f71d642cd
style: prefer 'char' to 'str' for single character patterns
2022-01-04 09:20:08 -06:00
Ed Page
19b59a2df8
fix(complete): Better organize the API
2021-12-31 13:25:09 -06:00