Ed Page
0e915e0d3a
docs(derive): Update for new attributes
2022-09-02 15:39:13 -05:00
Ed Page
2609b970a4
refactor(test): Update UI tests to new attributes
2022-09-02 15:23:04 -05:00
Ed Page
20ba828f21
Merge pull request #4179 from epage/attr
...
refactor(derive): Prepare for builder attributes
2022-09-02 15:13:08 -05:00
Ed Page
e0f2f6fbae
fix(derive): Builder-specialized attributes
2022-09-02 14:06:27 -05:00
Ed Page
dbdd449dc3
refactor(derive): Further generalize kind errors
2022-09-02 14:03:34 -05:00
Ed Page
97ce0c44f7
refactor(derive): Generalize Kind based error checks
2022-09-02 14:03:34 -05:00
Ed Page
59a4578898
refactor(derive): Track the item's Kind
2022-09-02 14:03:34 -05:00
Ed Page
0ae119fda9
fix(derive): Report deprecations for structopt attributes
...
This is more of a test bed for adding new attributes and deprecating
clap ones.
2022-09-02 14:03:31 -05:00
Ed Page
7b0c76de31
Revert "fix(derive): Remove structopt attribute support"
...
This reverts commit 521a012c28
.
2022-09-02 11:15:15 -05:00
Ed Page
7eaa226526
fix(derive): Provide deprecations for bald action/value_parser
...
These will be going away, so we should tell the user.
This is mostly a test bed for our new deprecation plumbing.
2022-09-02 11:14:31 -05:00
Ed Page
edce5c2119
fix(derive): Improve Kind conflict errors
...
This makes it better scale for the future
2022-09-02 10:48:38 -05:00
Ed Page
11ffcf9393
refactor(derive): Determine an Item's Kind first
...
This will allow the attribute processing to change based on the kind
2022-09-02 10:41:34 -05:00
Ed Page
c56277c084
refactor(derive): Make Sp copyable
2022-09-02 10:23:09 -05:00
Ed Page
ebe181acc7
Merge pull request #4176 from epage/derive
...
fix(derive): Remove helper for removed help_heading
2022-09-02 10:19:28 -05:00
Ed Page
6d44106e76
fix(derive): Remove helper for removed help_heading
2022-09-02 09:58:08 -05:00
Ed Page
cdb83ae1c7
Merge pull request #4174 from ModProg/4153-value_help_comma
...
value help comma
2022-09-02 08:48:24 -05:00
Roland Fredenhagen
8ab649e929
fix(complete): Escape , in completions for fish
2022-09-02 14:47:04 +02:00
Roland Fredenhagen
028a4cd0dc
test(complete): Disable normalization of \ to /
...
This allows easier testing, as the generated completion files can be
sourced directly.
2022-09-02 14:46:12 +02:00
Ed Page
5e69f92efc
Merge pull request #4169 from epage/helper
...
feat(parser): Provide convenience accessors for Actions
2022-09-01 19:56:33 -05:00
Ed Page
5112372c77
feat(parser): Provide convenience for SetTrue
...
I wanted to make `bool` a defaulted type parameter but
https://github.com/rust-lang/rust/issues/36887
2022-09-01 19:40:56 -05:00
Ed Page
80ec011b6e
feat(parser): Provide convenience accessor for Counts
2022-09-01 19:19:55 -05:00
Ed Page
3ec2f0f795
Merge pull request #4168 from epage/perf
...
perf(derive): Remove redundant operations
2022-09-01 14:07:18 -05:00
Ed Page
5264a62181
perf(derive): Consolidate field/variant parsing
2022-09-01 13:54:43 -05:00
Ed Page
6e8b366107
perf(derive): Stop generating redundant code
2022-09-01 13:50:27 -05:00
Ed Page
a47462123c
refactor(derive): Only pass around what is needed
2022-09-01 13:21:57 -05:00
Ed Page
a86cb8a26c
refactor(derive): Rely on Self for enums
2022-09-01 12:14:55 -05:00
Ed Page
0b5f95e3a3
perf(derive): Further consolidate parsing of attrs
2022-09-01 12:04:10 -05:00
Ed Page
a20c67c88f
Merge pull request #4167 from epage/deps
...
chore: Update dependencies
2022-09-01 07:27:42 -05:00
Ed Page
6bd4fee69f
chore: Update dependencies
2022-09-01 07:09:32 -05:00
Ed Page
d8524b5ad1
refactor(derive): Clarify parse is really about attributes
2022-09-01 07:07:19 -05:00
Ed Page
d9844002e5
refactor(derive): Clarify we are dealing with API item
2022-08-31 21:19:26 -05:00
Ed Page
7242e22810
perf(derive): Reduce number of times attributes are parsed
2022-08-31 19:58:14 -05:00
Ed Page
7e4b5f6196
Merge pull request #4162 from epage/help
...
fix(usage): Have spillover use TAB
2022-08-31 16:42:32 -05:00
Ed Page
cdcbf1300d
fix(usage): Have spillover use TAB
...
This was missed in #4161
2022-08-31 16:20:56 -05:00
Ed Page
13c1442a6e
Merge pull request #4161 from epage/magic
...
refactor(help): Reduce magic numbers for indentation
2022-08-31 16:17:48 -05:00
Ed Page
671914b590
fix(error): Make whitespace consistent with self/help
...
Sometimes errors would use a tab, sometimes four spaces. This makes it
always four spaces and shares a definition with help.
2022-08-31 16:02:14 -05:00
Ed Page
439c9e7a91
feat(help): Expose clap's indentation to help_template
...
This will make it easier for help templates to be consistent with clap
2022-08-31 15:42:59 -05:00
Ed Page
803d87b193
refactor(help): Reduce magic numbers
2022-08-31 15:39:15 -05:00
Ed Page
e643e6058a
Merge pull request #4160 from epage/template
...
fix(help): Remove name/version/author from help
2022-08-31 15:32:02 -05:00
Ed Page
65b5b5f7bf
fix(help): Remove name/version/author from help
...
This is to help shorten it and polish it by removing redundant
information.
This is a part of #4132
2022-08-31 15:06:15 -05:00
Ed Page
cdb812b28b
Merge pull request #4159 from epage/help
...
fix(help): Clarify short vs long help
2022-08-31 14:38:12 -05:00
Ed Page
1855c57bc6
Merge pull request #4158 from epage/ver
...
test(help): Verify how version interacts
2022-08-31 14:27:39 -05:00
Ed Page
c1c269b427
fix(help): Clarify short vs long help
...
In reviewing CLIs for #4132 , I found some were providing helps on `-h`
vs `--help` and figured that could be built directly into clap. I had
considered not making this hint automatic but I figured the overhead of
checking if long exists wouldn't be too bad. The code exists (no binary
size increase) and just a simple iteration is probably not too slow
compared to everything else.
Fixes #1015
2022-08-31 14:25:46 -05:00
Ed Page
9cc0299c0c
test(help): Verify how version interacts
2022-08-31 14:11:00 -05:00
Ed Page
75e340a3d9
Merge pull request #4157 from epage/cleanup
...
refactor(derive): Be explicit in what is being parsed
2022-08-31 10:24:51 -05:00
Ed Page
78dc60bd37
refactor(derive): Be explicit in what is being parsed
2022-08-31 10:11:49 -05:00
Ed Page
430202b389
Merge pull request #4156 from epage/trim
...
fix(help): Always trim output
2022-08-31 09:55:08 -05:00
Ed Page
cdfd455ee6
fix(help): Always trim output
...
This ensures we don't end up with accidental leading or trailing
newlines due to help template variables not being used when a section is
empty.
This is prep for removing name/version from the default template and is
part of #4132
2022-08-31 09:35:33 -05:00
Ed Page
87cc6f9a1e
docs: Add workaround to changelog
2022-08-31 09:06:43 -05:00
Ed Page
0a20466597
Merge pull request #4155 from epage/command
...
fix(help): Use Command in place of Subcommand
2022-08-31 09:04:52 -05:00