Ed Page
3bfa9d5ff0
feat(derive): Reserve 'group' attribute
2022-09-13 07:06:06 -05:00
Ed Page
79321f25e4
Merge pull request #4208 from epage/columns
...
fix(help): Respect LINES and COLUMNS
2022-09-12 21:18:00 -05:00
Ed Page
0eb95022a5
fix(help): Respect LINES and COLUMNS
...
Fixes #4186
2022-09-12 20:17:20 -05:00
Ed Page
0760498200
refactor(help): Allow looking up dimensions independently
2022-09-12 19:55:13 -05:00
Ed Page
1466cd5f55
Merge pull request #4207 from epage/arg
...
fix: Make `arg!(--flag <value>)` optional by default
2022-09-12 19:47:59 -05:00
Ed Page
c9eef44213
fix: Make arg!(--flag <value>)
optional by default
...
This was ported over from the usage parser which modeled after docopt.
We just never got around to implementing the rest of the syntax.
However, when considering this as a standalone feature, an
`arg!(--flag <value>)`, outside of other context, should be optional.
This is how the help would display it.
Fixes #4206
2022-09-12 17:10:01 -05:00
Ed Page
75a73f3fe0
docs: Feature moved to v3
2022-09-12 16:25:18 -05:00
Ed Page
a86e55ad3e
docs: Add more highlights
2022-09-09 19:06:33 -05:00
Ed Page
fadcaf9860
docs: Help people through Action changes
2022-09-08 16:02:12 -05:00
Ed Page
6f185a8704
docs: Clarify intent of upgrade link
2022-09-08 15:56:56 -05:00
Ed Page
bf98110adc
Merge pull request #4197 from epage/dynamic
...
fix: Tests/clippy/errors bash dynamic completion
2022-09-07 20:25:20 -05:00
Roland Fredenhagen
a2cf7f1dea
fix: Tests/clippy/errors bash dynamic completion
2022-09-07 20:25:06 -05:00
Ed Page
4e703d1e2e
Merge pull request #4193 from epage/stable
...
revert(derive): Bald action/value_parser are deprecated, its good enough
2022-09-07 20:01:00 -05:00
Ed Page
430a384984
Merge pull request #4196 from epage/link
...
docs(parser): Clarify needs for negative numbers
2022-09-07 20:00:49 -05:00
Ed Page
81c3925bb8
Merge pull request #4194 from epage/assert
...
perf(assert): Don't make release pay the cost
2022-09-07 20:00:35 -05:00
Ed Page
fa7a1fca58
docs(parser): Clarify needs for negative numbers
2022-09-07 19:48:10 -05:00
Ed Page
afeed4043c
perf(assert): Don't make release pay the cost
2022-09-07 19:43:26 -05:00
Ed Page
17f49df4e2
revert(derive): Bald action/value_parser are deprecated, its good enough
...
When I removed these in v5, we didn't have a deprecation approach for
the derive and I didn't want to forget. Now we do have a deprecation
approach and that is the reminder, so we don't need to carry around v5
changes.
2022-09-07 19:34:50 -05:00
Ed Page
b502ac750b
docs: Summarize reason for change
2022-09-07 19:30:57 -05:00
Ed Page
a9333b7074
docs: Specify that we will support prior major versions
...
This came up in a [reddit
discussion](https://www.reddit.com/r/rust/comments/vbep9q/clap_32_last_call_before_40/ic91vul/ )
and seems like a way we can reduce concerns over clap churn without an
undue burden on maintainers.
2022-09-07 19:12:01 -05:00
Ed Page
985a1b9b4a
docs(derive): Collect tips at end
2022-09-07 18:56:05 -05:00
Ed Page
c95c9f2fac
Merge pull request #4192 from epage/tab
...
fix(help): Make output more dense
2022-09-07 18:52:29 -05:00
Ed Page
c90a4eabae
fix(help): Make output more dense
...
In looking at other help output, I noticed that they use two spaces, in
place of clap's 4, and it doesn't suffer from legibility. If it
doesn't make the output worse, let's go ahead and make it as dense so we
fit more content on the screen.
This is a part of #4132
2022-09-07 17:13:55 -05:00
Ed Page
ed6475e9de
fix(help): Clarify what is tab dependent and what isn't
2022-09-07 16:39:14 -05:00
Ed Page
56fe50eab8
fix(help): I think this fixes a bug?
...
The existing behavior is hard to explain, so this is the best I've
figured is going on.
2022-09-07 16:38:33 -05:00
Ed Page
876da97d1c
fix(help): Make next-line help less sensitive to tab changes
2022-09-07 15:52:26 -05:00
Ed Page
d3fc37b678
fix(help): Long-only indentation is independent of TAB
2022-09-07 15:07:47 -05:00
Ed Page
65c289784b
Merge pull request #4190 from epage/nxt
...
fix(help):Be dense on short next line help
2022-09-07 14:28:06 -05:00
Ed Page
bbb6c38bad
fix(help):Be dense on short next line help
...
If short help is too long for the terminal, clap will automatically
switch to next line help. As part of next line help for longs, we add a
blank line between args. This helps make the args clearer when dealing
with multiple paragraphs. However, its not as much needed for short and
subcommands (always short), so now short matches subcommands.
This was inspired by #3300 and a part of #4132
2022-09-07 14:05:17 -05:00
Ed Page
69dd145767
docs: Fix code fence
2022-09-07 13:40:03 -05:00
Ed Page
b7b12ea558
docs: Add another highlighted difference
2022-09-07 12:45:25 -05:00
Ed Page
55e2297174
docs: Write v4 migration
2022-09-07 12:43:57 -05:00
Ed Page
4cb42c640d
Merge pull request #4189 from epage/last
...
docs: Show how last can be used
2022-09-07 11:44:28 -05:00
Ed Page
61f8a9375a
docs: Show how last can be used
...
We can't quite get git's behavior because it has `last` as both before
and after `--`
2022-09-07 11:27:39 -05:00
Ed Page
a228df39b8
Merge pull request #4188 from epage/usage
...
fix(help): Collapse usage to one line
2022-09-07 11:19:42 -05:00
Ed Page
9a645d2d19
fix(help): Collapse usage to one line
...
After looking at more examples, I've become more attached to this
briefer format.
Part of #4132
2022-09-07 11:03:57 -05:00
Ed Page
f97670aca8
Merge pull request #4187 from epage/exp
...
fix(parser): Resolve problems around `allow_hyphen_values`
2022-09-07 07:39:23 -05:00
Ed Page
1258f3e5f6
fix: Deprecate Command::allow_negative_numbers
...
Better to set on individual args
2022-09-07 07:24:42 -05:00
Ed Page
8ad29ef337
feat: Allow specifying negative nums on Arg, like hyphens
2022-09-07 07:18:19 -05:00
Ed Page
16d5a2a19a
perf: Shrink the code
2022-09-07 07:00:58 -05:00
Ed Page
2ebe5ae795
docs: Cross-link allow_hyphe_values with trailing_var_arg
2022-09-06 21:24:06 -05:00
Ed Page
d45e4be14b
fix(derive): Deprecate Command::allow_hyphen_values
...
Fixes #3450
2022-09-06 20:50:09 -05:00
Ed Page
7a2bbca62b
fix(derive): Make Command::allow_hyphen_values forward to Arg
2022-09-06 19:41:17 -05:00
Emerson Ford
fd9a5a1d50
fix(parser): Arg::allow_hyphen_values correctly handles long args in first pos
...
This makes it match up with `Command::allow_hyphen_values` which was the
guiding factor for what the behavior should be.
This supersedes #4039
Fixes #3880
Fixes #1538
2022-09-06 19:41:17 -05:00
Ed Page
94a5e7fa1a
refactor(parser): Highlight short/long parallels
2022-09-06 19:41:17 -05:00
Ed Page
bc5c5e4a9f
fix(parser): Make Command/Arg behave same for shorts with allow_hyphen_values
2022-09-06 19:41:17 -05:00
Ed Page
bffce7f57a
fix: Deprecate Command::trailing_var_arg
...
Now that we have it on `Arg`, we don't need it on `Command`
2022-09-06 19:41:17 -05:00
Ed Page
b07d02ef46
feat: Allow specifying trailing_var_arg on Arg, like last
...
This has been a bit out of place being on the command. Now its clearer
what the user intends to be the trailing var arg and it is more likely
to be discovered.
2022-09-06 19:41:14 -05:00
Ed Page
f731ce70e4
Merge pull request #4185 from epage/setting
...
refactor: Use parameters over settings
2022-09-06 15:09:53 -05:00
Ed Page
1dd9245fff
refactor: Use parameters over settings
2022-09-06 14:43:02 -05:00