Ed Page
06d43a02da
fix(help): Subcommand help
looks like --help
...
Like was said in #2435 , this is what people would expect.
While we should note this in a compatibility section in the changelog, I
do not consider this a breaking change since we should be free to adjust
the help output as needed. We are cautious when people might build up
their own content around it (like #3312 ) but apps should already handle
this with `--help` so this shouldn't be a major change.
We aren't offering a way for people to disable this, assuming people
won't need to. Longer term, we are looking at support "Actions" (#3405 )
and expect those to help customize the flags. We'll need something
similar for the `help` subcommand.
Fixes #3440
2022-02-11 12:47:34 -06:00
Ed Page
272f840178
feat: Replace core set of AppSettings with functions
...
This is a part of #2717
Some settings didn't get getters because
- They are transient parse settings (e.g. ignore errors)
- They get propagated to args and should be checked there
`is_allow_hyphen_values_set` is a curious case. In some cases, we only
check the app and not an arg. This seems suspicious.
2022-02-11 12:35:09 -06:00
Ed Page
de7c81e059
fix(error): Deprecate WaitOnError
...
Fixes #3439
2022-02-11 09:00:10 -06:00
Ed Page
547665d52a
fix(color): Allow overriding previous settings
2022-02-11 09:00:10 -06:00
Ed Page
bdb034b1b5
docs: Clarify app-wide vs command-specific settings
2022-02-11 09:00:10 -06:00
Ed Page
b076f81207
Merge pull request #3448 from epage/examples
...
docs(examples): Add missing feature flag reqs
2022-02-11 07:41:06 -06:00
Ed Page
f00f97c8c4
docs(examples): Add missing feature flag reqs
2022-02-11 07:07:03 -06:00
Ed Page
5f71ca0a3c
Merge pull request #3444 from epage/deprecated
...
fix: Deprecate various APIs
2022-02-10 19:52:42 -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
48686804c7
docs(man): Fix links
2022-02-10 13:54:29 -06:00
Ed Page
c422ed24df
Merge pull request #3438 from epage/flatten
...
refactor: Flatten directory heirarcy
2022-02-10 11:47:10 -06:00
Ed Page
60a8747603
refactor: Flatten directory heirarchy
2022-02-10 11:17:08 -06:00
Ed Page
fb9e4e7c25
refactor: Centraize all debug asserts
2022-02-10 11:10:34 -06:00
Ed Page
b7842c2e11
refactor: Flatten directory heirarchy
2022-02-10 11:07:57 -06:00
Ed Page
727c453322
Merge pull request #3434 from epage/setting
...
feat: Add `Arg` getters for all settings
2022-02-10 10:37:59 -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
Ed Page
3b4c44eccc
Merge pull request #3430 from AlyoshaVasilieva/validator-doc
...
Doc that `validator` takes &str, not String
2022-02-10 06:06:10 -06:00
Ed Page
a422455258
Merge pull request #3431 from AlyoshaVasilieva/concom
...
docs: fix Conventional Commits link
2022-02-10 06:05:48 -06:00
Malloc Voidstar
6a384a09a2
docs: Fix Conventional Commits link
2022-02-09 21:35:17 -08:00
Malloc Voidstar
bd49665bd5
docs: validator
takes &str, not String
...
Explicit link removed as it doesn't appear to be necessary
2022-02-09 21:03:19 -08:00
Ed Page
519fcc2e11
Merge pull request #3429 from epage/global
...
fix: Detect deeply recursed global args
2022-02-09 16:23:51 -06:00
Ed Page
81092b5aed
fix: Detect deeply recursed global args
...
Fixes #3428
2022-02-09 16:05:27 -06:00
Ed Page
82dfc7d5ea
perf: Reduce parse allocations
2022-02-09 15:24:52 -06:00
Ed Page
117c9edb6e
Merge pull request #3427 from epage/example
...
docs(tutorial): Demonstrate custom parsing
2022-02-09 10:05:20 -06:00
josh rotenberg
ee3eab1614
docs(tutorial): Demonstrate custom parsing
...
Adds a more in depth validator to validate that the port is in range in the derive and builder tutorial (section 4.2).
This supersedes #3416
2022-02-09 09:16:57 -06:00
Ed Page
1b5f9e6450
Merge pull request #3425 from epage/help
...
fix(assert): Provide next steps for '-h' conflicts
2022-02-08 19:16:03 -06:00
Ed Page
6c60b79d21
fix(assert): Provide next steps for '-h' conflicts
...
For now, we are going to provide a better debug assert in this case.
Resolving #3405 is the better long term route.
Fixes #3403
2022-02-08 18:56:14 -06:00
Ed Page
df1d50c367
fix: Easier to debug help flags
2022-02-08 18:51:51 -06:00
Ed Page
0aabcd70c1
test: Ensure we can avoid a short on help
2022-02-08 18:51:51 -06:00
Ed Page
341b12874d
docs(faq): Raise visibility of migration guide
...
Part of #3422
2022-02-08 17:31:16 -06:00
Ed Page
62759ffea7
Merge pull request #3424 from epage/source
...
feat(parser): Expose ValueSource
2022-02-08 15:22:55 -06:00
Ed Page
12c29526fa
fix(parser): Give room for more ValueSources
2022-02-08 15:05:59 -06:00
Ed Page
f42fc89288
fix(parser): Remove an internal-only ValueSource
2022-02-08 15:05:59 -06:00
Ed Page
edda56f072
feat(parser): Expose ValueSource
...
Fixes #1345
2022-02-08 15:05:51 -06:00
Ed Page
31bd34ca1a
Merge pull request #3423 from epage/assert
...
fix(assert): Report invalid defaults in debug asserts
2022-02-08 15:01:42 -06:00
Ed Page
9f41bb3948
fix(assert): Report invalid defaults in debug asserts
...
This can help people catch them via `App::debug_assert` rather than
waiting until the default is used and validated.
Fixes #3202
2022-02-08 14:41:33 -06:00
Ed Page
edf9d057c4
Merge pull request #3421 from epage/more
...
fix(help): ArgsRequiredElseHelp should ignore defaults
2022-02-08 14:23:35 -06:00
Ed Page
15f01789d2
Merge pull request #3420 from epage/default
...
Requires and Conflicts should ignore default_value
2022-02-08 12:59:20 -06:00
Ed Page
b2d1ebef4b
fix(help): ArgsRequiredElseHelp should ignore defaults
...
Fixes #1264
2022-02-08 12:34:19 -06:00
Ed Page
25b8fe8edb
Revert "Revert "Revert "Revert "docs: Clarify corner caseses with default values""""
...
This reverts commit 26bbe606d3
.
2022-02-08 12:27:52 -06:00
Ed Page
d3b084926a
test(validate): Ensure defaults are ignored
2022-02-08 12:27:40 -06:00
Ed Page
e87881f91a
fix(validate): Limit relationship checks to non-defaults
2022-02-08 12:17:39 -06:00
Ed Page
f59c82bc1d
refactor(validate): Clarify intent of code
2022-02-08 11:52:07 -06:00
Ed Page
279e39a858
fix(validate): Only check requires when target is set by user
...
Unrolling serves two distinct purposes but we muddied them together
- Is `requires` satisfied for validation
- Report what arguments are currently considered required for usage
This was split out of #3020
2022-02-08 11:24:47 -06:00
Ed Page
135b15467e
chore: Release
2022-02-08 10:28:40 -06:00
Ed Page
1330a46bf0
docs: Update changelog
2022-02-08 10:28:27 -06:00
Ed Page
fc0eeb28bb
Merge pull request #3419 from epage/man
...
docs(man): Add some basic documentation
2022-02-08 10:25:24 -06:00
Ed Page
6cd069ab5d
docs: Expand doc comments
2022-02-08 10:10:22 -06:00
Ed Page
c5080f1139
docs(man): Fill our README
2022-02-08 09:59:57 -06:00
Ed Page
f1980313bf
Merge pull request #3417 from alerque/repo-config
...
chore(gh): Update list of crates in scope of issue tracker
2022-02-08 08:16:45 -06:00