Commit graph

5057 commits

Author SHA1 Message Date
Ed Page
b0199dc297
Merge pull request #3414 from epage/todo
feat: Help Heading and Display Order work in prep for deprecations
2022-02-07 19:58:15 -06:00
Ed Page
6ad52f41b3 feat: Allow disabling derive display order
In clap 4.0, we will make `DeriveDisplayOrder` the default and this is
how you'll disable it.

This is part of #2808
2022-02-07 19:19:11 -06:00
Ed Page
5290f82133 feat: Override DeriveDisplayOrder behavior with App::next_display_order
For the derive API, you can only call `next_display_order` when dealing
with a flatten.  Until we offer app attributes on arguments, the user can workaround with
this no-op flattens.

This is a part of #1807
2022-02-07 19:19:11 -06:00
Ed Page
16bf834aa5 refactor: Prepare for overriding derived display order 2022-02-07 19:19:11 -06:00
Ed Page
c00f71ec4a feat: Add App::next_help_heading
This clarifies the intent and prepares for other functions doing the
same, like `next_display_order`.  This will then open us to name
`subcommand_help_heading` and `display_order` similar.

The deprecation is waiting on 3.1.

This is part of #1807 and #1553.
2022-02-07 19:19:01 -06:00
Ed Page
4f50e97f23 docs: Prepare for 3.1 deprecations
Don't want to forget this remaining work
2022-02-07 19:17:09 -06:00
Ed Page
6bfe7f5a0b
Merge pull request #3402 from epage/context
feat(error): Expose error building blocks
2022-02-07 15:37:27 -06:00
Ed Page
07e4e424ac perf(error): Take arond 5kb off 2022-02-07 14:55:24 -06:00
Ed Page
e3e0a91561 fix(error): Don't overload fields 2022-02-07 14:47:49 -06:00
Ed Page
0dfdeb07bc test: Update 2022-02-07 13:28:48 -06:00
Ed Page
84416b267c style: Make clippy happy 2022-02-07 13:06:04 -06:00
Ed Page
600d741d65 feat(error: Expose unknown-argument context 2022-02-07 13:03:23 -06:00
Ed Page
6079bae959 perf: Reduce binary size by 11k 2022-02-07 12:35:23 -06:00
Ed Page
3f06e13a85 feat(error: Expose argument-not-found context 2022-02-07 10:58:02 -06:00
Ed Page
a4b044df81 feat(error: Expose unexpected-multiple context 2022-02-07 10:32:42 -06:00
Ed Page
5c3868ea4c chore: Release 2022-02-05 09:33:39 -06:00
Ed Page
28ea108374 docs: Update changelog 2022-02-05 09:33:12 -06:00
Ed Page
a27d4bd943
Merge pull request #3409 from babysnakes/powershell-allow-completion-of-partial-commands
Allow completion of partial commands
2022-02-05 09:31:44 -06:00
Ed Page
5674587eb2 docs: Try to steer people to better practices 2022-02-05 09:18:05 -06:00
Haim Ashkenazi
c90a48bf0b More failing tests, hope this will end it :( 2022-02-05 17:16:40 +02:00
Haim Ashkenazi
3c2cea9754 Fixed failing test 2022-02-05 17:09:06 +02: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
2434f51129 feat(error: Expose wrong-number context 2022-02-04 14:52:31 -06:00
Ed Page
7497dbb6cc feat(error: Expose value-validation context 2022-02-04 14:35:52 -06:00
Ed Page
3d4f31b223 feat(error: Expose too-few context 2022-02-04 14:24:46 -06:00
Ed Page
ee2860e434 feat(error: Expose too-many-values context 2022-02-04 14:10:16 -06:00
Ed Page
2b60c598b7 feat(error: Expose too-many context 2022-02-04 13:53:57 -06:00
Ed Page
03fbb50283 refactor(error): Make room for more values 2022-02-04 13:44:49 -06:00
Ed Page
f7731d1f03 feat(error: Expose invalid-utf8 context 2022-02-04 13:42:36 -06:00
Ed Page
f54bcc85b7 feat(error: Expose missing-subcommand context 2022-02-04 13:18:51 -06:00
Ed Page
9b18f8087c feat(error: Expose missing-required context 2022-02-04 12:45:48 -06:00
Ed Page
71535866b9 feat(error: Expose invalid-subcommand context 2022-02-04 12:23:06 -06:00
Ed Page
5095e5c992 feat(error: Expose unrecognized-subcommand context 2022-02-04 11:15:22 -06:00
Ed Page
1a0d7bac29 feat(error: Expose invalid-value context 2022-02-04 10:24:51 -06:00
Ed Page
04aa6029b8 refactor(error): Generalize kind name 2022-02-04 10:08:51 -06:00
Ed Page
1463f82cf1 feat(error: Expose no equals context 2022-02-04 10:07:14 -06:00
Ed Page
9759f2f1ea refactor(error): Share template across kinds 2022-02-04 10:03:09 -06:00
Ed Page
630e7097fc feat(error: Expose empty value context 2022-02-04 10:01:07 -06:00
Ed Page
0c36fc2073 feat(error): Expose argument conflict context 2022-02-04 09:59:06 -06:00
Ed Page
7029e76545 refactor(error): Prepare for deferring formatting 2022-02-04 09:56:22 -06:00
Ed Page
c002951dc8 refactor(error): Centralize app knowledge 2022-02-04 09:51:34 -06:00
Ed Page
ee63f6cd9b refactor(error): Prepare for optional deferred formatting 2022-02-04 09:45:12 -06:00
Ed Page
af41e8d6b2 refactor(error): Separate try_help concerns 2022-02-04 08:49:55 -06:00
Ed Page
8de99407f9 feat(error): Impl Display for ErrorKind 2022-02-04 08:37:23 -06:00
Ed Page
4add5723ec refactor(error): Don't constrain start of errors
This also makes the intent for the start of an error clearer.
2022-02-04 08:21:24 -06:00
Ed Page
70b830a1ad refactor(error): Prepare for adding more app fields 2022-02-03 13:05:10 -06:00
Ed Page
00af9c11f8 refactor(error): Shift focus to modern fields 2022-02-03 12:59:59 -06:00
Ed Page
27469dc740 refactor(error): Centralize new formatting 2022-02-03 12:36:20 -06:00
Ed Page
1b66585dc2 feat(error): New error context API
This is meant to replace `Error::info` as part of #2628.
2022-02-03 12:30:49 -06:00
Ed Page
d1a6cca480 docs(readme): Link out to shadow for long_version
This seems like a case where we shouldn't solve all the problems but
point to others who do.

Fixes #1363
2022-02-03 08:43:17 -06:00