Ed Page
8ea1e2d4d3
fix!: Use value parsers for external subcommands
...
This changes the default type as well to encourage preserving the full
information for shelling out. If people need UTF-8, then they can
change the value parser.
Fixes #3733
2022-07-25 14:31:56 -05:00
Ed Page
2d469511f9
Merge pull request #3989 from epage/dupe
...
fix(assert)!: Prevent repeated subcommand names
2022-07-25 14:18:10 -05:00
Ed Page
475a0fc0a2
fix!: Remove PartialEq from Command
...
This gives us more implementation flexibility
2022-07-25 13:52:13 -05:00
Ed Page
13e672fb90
fix(assert)!: Prevent repeated subcommand names
...
Fixes #3888
2022-07-25 13:46:18 -05:00
Ed Page
3610a14e9e
Merge pull request #3988 from epage/occur
...
fix!: Remove multiple occurrences in favor of Append/Count
2022-07-25 13:45:47 -05:00
Ed Page
76c47f66e2
chore: Allow releasing from release branches
2022-07-25 13:31:25 -05:00
Ed Page
9fb9f563ad
docs: Update changelog
2022-07-25 13:31:17 -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
8c7fe8bb2f
Merge pull request #3986 from epage/override
...
fix(assert)!: Disallow self-overrides
2022-07-25 12:58:59 -05:00
Ed Page
b47a8453d7
Merge pull request #3933 from emersonford/vec-value-enum-default-value-t
...
feat(clap_derive): Add `default_values_t` and `default_values_os_t` for Vec field types
2022-07-25 12:54:43 -05:00
Ed Page
ec38212dcb
fix(assert)!: Disallow self-overrides
...
This will make it easier to drop support for multiple occurrences
2022-07-25 12:46:16 -05:00
Ed Page
5a8e2046af
fix(assert)!: Ensure overrides_with IDs are valid
2022-07-25 12:26:32 -05:00
Emerson Ford
04e0ed7474
feat(clap_derive): Add default_values_t
and default_values_os_t
2022-07-25 10:14:04 -07:00
Ed Page
fe6c0a509e
Merge pull request #3985 from tshepang/master
...
docs: Remove extraneous words
2022-07-25 09:20:34 -05:00
Tshepang Mbambo
2facce8301
docs: Remove extraneous words
2022-07-25 15:47:49 +02:00
Ed Page
8e0d6b011a
Merge pull request #3983 from tshepang/master
...
docs: typo
2022-07-25 08:01:45 -05:00
Tshepang Mbambo
ec9dcaaf16
docs: Fix a typo
2022-07-24 16:00:59 +02:00
Ed Page
732a21b1bf
test: Make version agnostic
2022-07-23 21:55:30 -05:00
Ed Page
a8881dfdba
Merge pull request #3982 from epage/ver
...
chore: Update version
2022-07-23 21:47:40 -05:00
Ed Page
8aa7ab3e16
chore: Update version
...
The main goal is to reduce the risk of people developing on the wrong
release, assuming they are using something like starship to raise the
visibility of the crate version.
2022-07-23 21:43:37 -05:00
Ed Page
ae35ff12ff
Merge pull request #3981 from epage/dep
...
fix!: Remove more deprecated APIs
2022-07-23 21:37:51 -05:00
Ed Page
dad2492de0
docs: Note change in derive behavior
2022-07-23 21:24:11 -05:00
Ed Page
a3356aae43
fix!: Remove more deprecated APIs
2022-07-23 21:23:06 -05:00
Ed Page
0eaec6085a
Merge pull request #3978 from epage/perf
...
perf: Remove some monomorphization bloat
2022-07-23 21:17:07 -05:00
Ed Page
7518332e56
Merge pull request #3979 from Lioness100/patch-1
...
docs: Remove extra bracket typo
2022-07-23 11:53:11 -05:00
Lioness100
304297e5c8
docs: remove extra bracket typo
2022-07-23 08:23:11 -07:00
Ed Page
8e38caadcc
perf: Remove some monomorphization bloat
...
When checking into binary size, I noticed that the `git` example is a
lot larger than v3. `git bisect` narrowed it down to
11076a5c70
which doesn't make sense. I
did noticed we could remove some bloat from monomorphization.
Overall for `cargo-example, we've dropped about 47 KiB.
2022-07-22 21:02:45 -05:00
Ed Page
08e8642a8c
Merge pull request #3976 from epage/attrib
...
fix(derive)!: Remove value_parser/action defaulted attributes
2022-07-22 20:25:09 -05:00
Ed Page
8771f941e0
Merge pull request #3977 from epage/action
...
fix!: Remove deprecated ArgActions
2022-07-22 20:24:32 -05:00
Ed Page
6ecb7310a8
fix(derive)!: Remove value_parser/action defaulted attributes
2022-07-22 20:07:47 -05:00
Ed Page
50259e51d5
fix!: Remove deprecated ArgActions
2022-07-22 20:07:24 -05:00
Ed Page
122b562e6b
fix!: Change default actions to Set/SetTrue
...
This is in prep for removing StoreValue/IncOccurrences
2022-07-22 20:00:47 -05:00
Ed Page
4b499ac024
docs(env): Fix bool example
2022-07-22 19:51:23 -05:00
Ed Page
0039ef91fa
fix: Have arg! collection across flags for positionals
2022-07-22 19:51:23 -05:00
Ed Page
3356e24360
refactor: Move action defaulting to where it belongs
2022-07-22 19:46:07 -05:00
Ed Page
3ca27f0879
refactor: Remove dead code for NoAutoHelp/NoAutoVersion
2022-07-22 19:42:49 -05:00
Ed Page
f47c361cdb
Merge pull request #3975 from epage/ord
...
fix(help)!: Make DeriveDisplayOrder the default, removing it
2022-07-22 16:18:51 -05:00
Ed Page
24735e3a1d
fix!: Pull AppSettings out of API
...
Part of #3021
2022-07-22 16:05:54 -05:00
Ed Page
11076a5c70
fix(help)!: Make DeriveDisplayOrder
the default, removing it
...
Force sorting with `next_display_order(None)`
Fixes #2808
2022-07-22 15:52:03 -05:00
Ed Page
389ff4ff21
fix(help): Subcommand display order respects Command::next_display_order
...
Previous behavior:
- They'd be sorted by default
- They'd derive display order if `DeriveDisplayOrder` was set
- This could be set recursively
- The initial display order value for subcommands was 0
New behavior:
- Sorted order is derived by default
- Sorting is turned on by `cmd.next_display_order(None)`
- This is not recursive, it must be set on each level
- The display order incrementing is mixed with arguments
- This does make it slightly more difficult to predict
2022-07-22 15:03:16 -05:00
Ed Page
ce8ebe1ccc
Merge pull request #3974 from epage/conflict
...
fix!: Ignore required when subcommands conflict with required
2022-07-22 14:25:12 -05:00
Ed Page
e09a3321af
fix!: Ignore required when subcommands conflict with required
...
Fixes #3940
2022-07-22 14:10:27 -05:00
Ed Page
bd0ceb7a0a
Merge pull request #3972 from epage/arg-macro
...
fix!: Change `arg!` to use ArgAction
2022-07-22 13:41:17 -05:00
Ed Page
36dcb05d96
fix!: Change arg!
to use ArgAction
...
Fixes #3795
2022-07-22 13:24:40 -05:00
Ed Page
d162b846ca
Merge pull request #3973 from epage/help-env
...
fix(env)!: Parse help/version like normal
2022-07-22 13:23:06 -05:00
Ed Page
b77ed545ac
fix(env)!: Parse help/version like normal
...
Fixes #3776
2022-07-22 13:12:12 -05:00
Ed Page
bcc689df24
Merge pull request #3969 from epage/else
...
fix(derive): Move off of SubcommandRequiredElseHelp
2022-07-22 12:52:04 -05:00
Ed Page
8b064cfee9
fix(derive): Move off of SubcommandRequiredElseHelp
...
This also let us remove the deprecated attribute
Fixes #3280
2022-07-22 12:33:31 -05:00
Ed Page
50019cacdc
Merge pull request #3967 from epage/parse
...
fix(derive)!: Remove deprecated parse attribute
2022-07-22 12:27:43 -05:00
Ed Page
b8d769a1a4
Merge pull request #3968 from epage/suberror
...
fix(error)!: Merge UnrecognizedSubcommand into InvalidSubcommand
2022-07-22 12:24:27 -05:00