Commit graph

6167 commits

Author SHA1 Message Date
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
Ed Page
7068586246 fix(derive)!: Remove deprecated parse attribute 2022-07-22 12:14:29 -05:00
Ed Page
0d459128d7 fix(error)!: Merge UnrecognizedSubcommand into InvalidSubcommand
Fixes #3676
2022-07-22 12:12:35 -05:00
Ed Page
5a4da7e777
Merge pull request #3966 from epage/unstable
fix!: Remove `unstable-v4` feature gate
2022-07-22 11:53:12 -05:00
Ed Page
7307f22c73 fix(derive): Remove error check for old raw attributes 2022-07-22 11:41:00 -05:00
Ed Page
a842bd64a0 fix!: Use display_name rather than bin_name in version output 2022-07-22 11:40:30 -05:00
Ed Page
01a3ea425f fix!: Remove unstable-v4 feature gate 2022-07-22 11:34:06 -05:00
Ed Page
982d4ca361
Merge pull request #3965 from epage/empty
fix(error):! Merge EmptyValue into InvalidValue
2022-07-22 09:18:41 -05:00
Ed Page
16b0362807 fix(error):! Merge EmptyValue into InvalidValue
There isn't a reason to programmatically differentiate them so this
merges them simplify programamtic cases and to hopefully reduce binary
size.
2022-07-22 09:06:01 -05:00
Ed Page
017b87abb0
Merge pull request #3963 from epage/deprecated
fix!: Remove deprecated APIs
2022-07-21 19:22:15 -05:00
Ed Page
1281e78dc0 test: Limp along 2022-07-21 17:08:35 -05:00
Ed Page
0902ac71f5 docs: Don't link to removed functions 2022-07-21 17:05:57 -05:00
Ed Page
cf60f84894 fix!: Remove ArgSettings from the API 2022-07-21 16:17:44 -05:00
Ed Page
09c6405d5c fix!: Remove validator 2022-07-21 16:05:39 -05:00
Ed Page
f10809f0cc fix!: Remove possible_values 2022-07-21 15:54:26 -05:00
Ed Page
d7618c79af fix!: Remove args_override_self 2022-07-21 15:45:12 -05:00
Ed Page
fbd6e19f05 fix(complete)!: Remove deprecated Shell::possible_values 2022-07-21 15:40:40 -05:00
Ed Page
0405966896 fix!: Remove allow_invalid_utf8 2022-07-21 15:32:10 -05:00
Ed Page
0f3e1b17cf fix!: Remove max_occurrences 2022-07-21 15:26:22 -05:00
Ed Page
137924fe48 fix!: Remove forbid_empty_values 2022-07-21 15:24:25 -05:00
Ed Page
6e1e0f9fa2 fix!: Remove App alias for Command 2022-07-21 15:08:37 -05:00
Ed Page
b94d5fcec0 fix!: Remove renamed deprecated functions 2022-07-21 14:57:55 -05:00
Ed Page
bcad76396b fix!: Remove ErrorKind::ArgumentNotFound
This existed for `value_of_t` and isn't needed anymore
2022-07-21 14:42:34 -05:00
Ed Page
75ebeca6d8 fix!: Remove clap 2.x compatibility functions 2022-07-21 14:34:27 -05:00
Ed Page
cd9cbb4c20 fix!: Remove ArgMatches::*value* functions 2022-07-21 14:24:16 -05:00
Ed Page
7d403fad78 test: Remove legacy cases 2022-07-21 13:38:24 -05:00
Ed Page
d4d21b0f7f fix!: Remove WaitOnError 2022-07-21 13:35:49 -05:00
Ed Page
fc7aa40c87 fix!: Remove Error::info and Error::kind fields 2022-07-21 13:06:11 -05:00
Ed Page
819c1e061d fix!: Remove deprecated macros 2022-07-21 13:03:21 -05:00
Ed Page
57bfb8c425 fix!: Remove usage parser 2022-07-21 12:59:56 -05:00
Ed Page
6428618bf2 fix(derive)!: Remove deprecated trait methods 2022-07-21 12:57:17 -05:00
Ed Page
ff0796b014 fix(derive)!: Remove old derive names 2022-07-21 12:57:12 -05:00
Ed Page
da5d5b8b53 fix!: Remove SubCommand 2022-07-21 12:48:52 -05:00