Commit graph

159 commits

Author SHA1 Message Date
Josh Triplett
416b1a8da7 fix: Remove unused dev-dependencies
These dependencies are used elsewhere in clap, but not in these crates.
`cargo test` and `cargo check --examples` both still pass with these
dependencies removed.
2023-10-10 20:11:33 +08:00
Ed Page
29f22c193c
Merge pull request #5160 from epage/docs
docs: Provide custom version/help flag examples
2023-10-04 17:01:16 -05:00
Ed Page
da7ebca04e docs: Provide custom help flag example 2023-10-04 16:25:31 -05:00
Ed Page
e74864f88a docs: Provide custom version flag example 2023-10-04 16:22:46 -05:00
renovate[bot]
4054a0c1a5
chore(deps): update compatible (dev) (#5151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-01 01:52:25 +00:00
Ed Page
39f5e807af chore: Release 2023-09-28 14:36:28 -05:00
Ed Page
485b957c4b chore: Upgrade anstream 2023-09-28 14:13:54 -05:00
Ed Page
c298f6a52c chore: Release 2023-09-25 15:59:01 -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
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
c344edf8b9 docs: Clarify most asserts are for debug builds 2023-09-19 12:38:21 -05:00
Ed Page
e6e539660f chore: Release 2023-09-18 09:28:47 -06:00
Colin Walters
84f99ff979 chore(builder): Bump terminal_size to 0.3
For some reason, terminal_size bumped semver recently; they
also bumped the rustix version to 0.38.

I'd like to reduce the number of copies of OS integration
crates (rustix and nix) in my dependency chain.  Let's bump
to the new version so I can aim to drop rustix 0.37.
2023-09-18 10:31:19 -04:00
renovate[bot]
dc63cba772
chore(deps): update compatible (dev) (#5108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-01 01:47:45 +00:00
Ed Page
3cd571e654 chore: Release 2023-08-31 13:19:11 -05:00
Ed Page
7a4f7d3f2c
Merge pull request #5106 from epage/once
perf: Drop a dep for faster builds
2023-08-31 13:18:15 -05:00
Ed Page
087224a486 perf: Drop a dep for faster builds
`OnceLock` became available as of 1.70 which is older than our new MSRV.
We can easily get away without `Lazy` variants.
2023-08-31 12:54:45 -05:00
Joe Chen
4012b195fd fix(builder): Update documentation comments 2023-08-31 13:22:35 +08:00
Ed Page
7126f78421 chore: Release 2023-08-28 11:45:19 -05:00
Ed Page
eb53db89f8 feat(help): Stabilize styling support
Fixes #3234
2023-08-28 09:49:48 -05:00
Ed Page
2e49645418 chore: Release 2023-08-24 11:08:02 -05:00
Ed Page
0b196a165c perf(builder): Speed up builds by dropping is-terminal 2023-08-24 10:19:28 -05:00
Ed Page
88cf306216 chore: Release 2023-08-23 09:21:22 -05:00
Ed Page
bf3f25ebb2 fix(help): Ensure padding isn't stripped
Fixes #5083
2023-08-22 16:02:33 -05:00
Ed Page
b9df80c2ce chore: Release 2023-08-18 16:07:31 -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
6720240577 feat(parser): Report source to value parsers 2023-08-18 14:28:15 -05:00
Ed Page
df337de701 chore: Release 2023-08-17 08:59:45 -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
Ed Page
ee1388c0a3 chore: Release 2023-08-07 20:36:44 -05:00
Ed Page
3156e1a35c
Merge pull request #5066 from 9999years/export-trymapvalueparser
feat: Allow referencing `TypedValueParser` in`ValueParserFactory` associated type
2023-08-07 20:35:49 -05:00
Ed Page
b96cbafcbe chore: Release 2023-08-07 20:33:13 -05:00
Rebecca Turner
c86172e891
feat: Export builder::TryMapValueParser
Partial fix for #5065, allows using TypedValueParser::try_map to
implement a ValueParserFactory.
2023-08-03 15:53:38 -07:00
renovate[bot]
6cd2706bf4
chore(deps): update compatible (dev) (#5059)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-01 01:20:36 +00:00
Josh Triplett
9c090262cd feat: Command::mut_args to modify all arguments
Convenient when you want to modify most or all arguments, without having
to call `mut_arg` for each one and name them all.
2023-07-28 21:16:29 -07:00
Ed Page
ae5549d61f chore: Release 2023-07-21 16:56:00 -05: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
9856d67541 chore: Release 2023-07-21 14:44:34 -05:00
Ed Page
6590a855ee fix(parser): Don't suggest -- as often
See #2766
2023-07-21 14:27:15 -05:00
Ed Page
d824b1f0fd chore: Release 2023-07-19 11:05:53 -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
95d411d151 chore: Release 2023-07-18 15:01:21 -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
51abbe7ebf chore: Release 2023-07-17 20:12:05 -05:00
Ed Page
82f17a40c0 docs(builder): Provide styling examples 2023-07-17 17:10:33 -05:00
Ed Page
e31768bb55 fix(builder): Re-export anstyle for easy access 2023-07-17 17:10:13 -05:00
Ed Page
98f62d1939 chore: Release 2023-07-17 10:55:26 -05:00