Ed Page
66d2bcbdd4
feat(help): Allow flattening help
2023-11-09 15:32:57 -06:00
Ed Page
caf5cdcfa0
feat(help): Allow flattening usage
2023-11-09 13:31:22 -06:00
Ed Page
a1fd922bda
feat(help): Allow controlling flattening
2023-11-09 13:31:11 -06:00
Ed Page
dfebb54423
style: Make clippy happy
2023-10-12 08:32:59 -05:00
Ed Page
3ac44040ef
Merge pull request #5025 from SUPERCILEX/resolve-alias-conflicts
...
fix: Resolve conflicting name inference if from aliases
2023-09-25 15:56:28 -05:00
Alex Saveau
a76789eb8b
fix: Make long subcommand flag inference consistent
...
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2023-09-25 13:28:27 -07:00
Alex Saveau
c2b8ec3bd3
fix: Resolve conflicting name inference if from aliases
...
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2023-09-25 13:18:54 -07:00
Alex Saveau
e5c6993cca
test: Long flags inference
...
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2023-09-25 13:18:50 -07:00
Ed Page
221177b9cb
fix(assert): Call out the action in positional assert
...
Brought up in #5135
2023-09-25 10:18:37 -05:00
Ed Page
eb53db89f8
feat(help): Stabilize styling support
...
Fixes #3234
2023-08-28 09:49:48 -05:00
Ed Page
d30d94f51c
chore: Update MSRV to 1.70
2023-08-24 10:14:23 -05:00
Ed Page
bf3f25ebb2
fix(help): Ensure padding isn't stripped
...
Fixes #5083
2023-08-22 16:02:33 -05:00
Ed Page
afefdc9414
test(help): Show padding bug
2023-08-22 16:00:10 -05:00
Ed Page
56135f3ff3
fix(builder): UnknownValueParser shouldn't error on flag absense
...
Fixes #5079
2023-08-18 14:29:37 -05:00
Ed Page
b55ebc9f7f
test(parser): Show bad Unknown bug on flags
2023-08-18 14:19:54 -05:00
Ed Page
9f65eb0c9a
refactor(error): Give caller control over suggestion
2023-08-16 14:54:45 -05:00
Ed Page
8413c155d2
feat(builder): Allow injecting known unknowns
...
Fixes #4706
2023-08-16 14:50:08 -05:00
Roland Fredenhagen
f16a1a76bc
chore: Clippy
2023-07-26 23:48:37 +07:00
Ed Page
8bee728034
fix(parser): Value terminator has higher precedence than later multiple values
...
This is one of several bugs found when looking at #4960 .
2023-07-21 16:41:08 -05:00
Ed Page
bdf205bff2
test(parser): Show one value terminator bug
2023-07-21 16:05:38 -05:00
Ed Page
6590a855ee
fix(parser): Don't suggest -- as often
...
See #2766
2023-07-21 14:27:15 -05:00
Ed Page
76b891db41
test(parser): Reproduce suggestion
2023-07-21 14:21:45 -05:00
Ed Page
8b536e2719
fix(help): Wrap long possible values correctly
...
We weren't taking the name into account when determining the wrap width.
Fixes #5022
2023-07-19 10:42:09 -05:00
Ed Page
4caa536ca4
fix(assert): Allow stateful value parsers
...
We'll need to re-evaluate how to solve #3202 .
Fixes #4643
2023-07-18 14:11:56 -05:00
Ed Page
97f4c72af1
test(examples): Verify all features
2023-07-17 17:01:31 -05:00
Ed Page
0ba987fca9
refactor(test): Make it easier to compare features with manifest
2023-07-17 16:57:22 -05:00
Ed Page
36afe99bfa
fix(help): Skip [OPTIONS]
if help/version action
...
Our code for detecting when to skip this in the usage was never updated
for actions.
2023-07-17 10:40:42 -05:00
Ed Page
22b545b98b
feat(help): Explicit control over short/long help
...
Fixes #4687
2023-07-17 10:37:26 -05:00
Ed Page
bc000aa4b0
fix(help): Defaulting max_term_width instead of max_term_width
...
Fixes #4295
2023-07-17 09:40:49 -05:00
Sebastian Toh
8103e9760a
fix(ignore_errors): Allow help and version command
2023-06-28 08:58:40 +08:00
Sebastian Toh
d451e0a60c
test(ignore_errors): Add help & version cmd tests
2023-06-28 08:55:10 +08:00
Alex Saveau
f9994bff47
fix: Broken long arg inference on conflicts
...
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2023-06-17 13:30:05 -07:00
Ed Page
d10938dd33
feat: Allow deferred initialization of subcommands
...
This is mostly targeted at reducing startup time for no-op commands
within *very* large applications, like deno (see #4774 ).
This comes at the cost of 1.1 KiB of binary size
2023-06-09 08:29:38 -05:00
Ed Page
103ae5cf62
fix(derive): Don't warn when people bring types into scope
...
Fixes #4951
2023-06-05 12:55:06 -05:00
Ed Page
a360fd8ac0
test(parser): Verify value terminator precedence
2023-05-19 11:04:48 -05:00
Ed Page
e1db168d69
fix(parser): Ensure terminated positionals are assigned correctly
2023-05-19 10:41:44 -05:00
Ed Page
1ee2e95e96
fix(builder): Allow value terminated multiple positional values
2023-05-19 10:39:05 -05:00
Ed Page
130b2ff997
test(parser): Show multiple positional multiple values behavior
2023-05-19 10:36:43 -05:00
Ed Page
c3fe7ff0a9
fix(help): Don't use next-line-help on long-help for subcommands
...
Subcommands don't switch their behavior on `--help`, so let's not switch
to next-line-help based on `--help`.
Fixes #4897
2023-05-12 10:41:05 +02:00
Ed Page
21d911db10
style: Make clippy happy
2023-05-19 09:10:20 -05:00
Ed Page
67cc5ea3a2
fix(assert): Clarify last assertion
...
An incremental improvement for #4911 .
2023-05-17 16:33:36 -05:00
Yuri Astrakhan
d0302c5556
chore: Inline simple non-mixed format args
2023-05-04 15:58:04 -04:00
Ed Page
1351c56289
fix(help): Consistently calculate PV name length
2023-05-03 20:15:31 -05:00
Ed Page
3963d73e18
perf(help): Remove next-help possible values
...
Next-line help for possible values does not feel like its pulling its
weight. If anything we should do next-line help for the entire
argument.
This dropped about 0.5 KiB but more importantly is prep for other
changes.
2023-05-03 20:09:36 -05:00
Yuri Astrakhan
797c23c415
chore: Inline format args using clippy fix
...
This command cleaned up all the format args,
making code significantly shorter and more readable.
```
cargo clippy --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2023-05-03 21:49:11 -04:00
Ed Page
950a495753
fix(help): Preserve block indent when wrapping
2023-04-19 11:55:53 -05:00
Ed Page
71344749e7
test(help): Show indented wrap behavior
2023-04-19 11:37:03 -05:00
Ed Page
feddd124b0
style: Move away from banned fns
2023-03-30 02:18:00 -05:00
Ed Page
56fe5e0ec0
fix!: Remove unstable-replace
feature flag
...
This has been implemented for 3 years without much traction for
finishing it up.
The subcommand use case can be worked around by creating `Command`s that
just include the relevant logic, very similar to the default subcommand
examples in `git` / `git-derive`.
Using this for flags is covered by #4793 .
Without `unstable-replace` being enabled, this still cut 5 KiB from
`cargo bloat --release --example git`.
Closes #2836
Closes #2011
2023-03-28 00:26:45 -05:00
Ed Page
fa60e723fc
fix(error): Give more idea why we are suggesting an arg
...
One challenge with this is finding something that generally works.
Making this work perfectly for one setting will make it inconsistent
with other settings and take up more binary size / compile time.
So in the end, I felt like just mirroring rustc (with a bit more
brevity) seemed like a decent experiment. This will be evaluated by the
feedback on release.
This is a small part of #4638
2023-03-27 20:45:27 -05:00