Commit graph

192 commits

Author SHA1 Message Date
Ed Page
21b671f689 chore: Release 2023-11-27 11:57:26 -06:00
Ed Page
b13f6d9862 fix(help): Hide 'help' if only flattened subcommand 2023-11-27 10:49:21 -06:00
Ed Page
a9322cabf3 fix(help): Hide subcommands in flattened usage 2023-11-27 10:43:16 -06:00
Ed Page
22130e3057 fix(help): Use right about when flattening
Fixes #5226
2023-11-27 09:28:30 -06:00
Kelly Thomas Kline
7568d5fa67
Update command.rs
Correct wording.
2023-11-16 21:06:03 -08:00
Ed Page
3aeea916e8 chore: Release 2023-11-10 16:24:46 -06:00
Ed Page
9c0f7a7253 fix(help): Recurse help flattening 2023-11-09 15:34:05 -06:00
Ed Page
4bef91ca3c refactor(help): Pull out flat subcommands 2023-11-09 15:34:03 -06:00
Ed Page
c9a7ef06e1 fix(help): Gloss over globals with flatten
When using globals, people tend to make all of the top-level arguments
global and cascading them through would just bloat the output.
2023-11-09 15:33:18 -06:00
Ed Page
9e5f93d43f fix(help): Be consistent in long/short help 2023-11-09 15:33:18 -06:00
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
2142b136b8 refactor: Pull out usage name fallback 2023-11-09 13:27:59 -06:00
Ed Page
4b60cefbf1 refactor: Pull out bin name fallback 2023-11-09 13:26:20 -06:00
Ed Page
c1c2e95ab6 refactor(help): Pull out subcommand usage logic 2023-11-09 12:52:08 -06:00
Ed Page
d9685bcc71 refactor(help): Bypass outer usage layer 2023-11-09 12:52:08 -06:00
Ed Page
25e3a87d3c refactor(help): Consolidate arg line usage generation 2023-11-09 12:14:25 -06:00
Ed Page
83981a7f7b refactor: Pull out arg usage line 2023-11-09 12:08:24 -06:00
Ed Page
0c668c3915 refactor(help): Pull out bin name logic 2023-11-09 12:03:35 -06:00
Ed Page
7472aba6ce refactor(help): Clarify usage condition 2023-11-09 12:00:52 -06:00
Ed Page
676e934a61 refactor(help): More directly write args 2023-11-09 11:57:15 -06:00
Ed Page
acdd2c33f0 refactor(help): Make usage argument order consistent 2023-11-09 11:50:46 -06:00
Ed Page
da98eb1a05 refactor(help): Pull out top-level usage logic 2023-11-08 11:49:07 -06:00
Ed Page
f50800f763 refactor(help): Only trim the end on usage 2023-11-08 11:42:54 -06:00
Ed Page
f04f04111b refactor(help): Switch usage creation to writing 2023-11-08 11:25:43 -06:00
Ed Page
6f7174cc7c refactor(help): Pull out usage separator 2023-11-08 11:10:55 -06:00
Ed Page
28425e484f style(docs): Resolve warnings 2023-11-07 13:44:41 -06:00
Ed Page
9bfa5a338c chore: Release 2023-10-24 13:25:07 -05:00
Ed Page
38b5a2f956 chore: Release 2023-10-24 11:45:21 -05:00
Alex Crichton
9a9aabc178 refactor: Reduce code size of testing tokens if they're a number
This commit is a tiny win in compiled code size of a final binary
including `clap` which shaves off 19k of compiled code locally.
Previously tokens were checked if they were a number by using
`.parse::<f64>().is_ok()`, but parsing floats is relatively heavyweight
in terms of code size. This replaces the check with a more naive "does
this string have lots of ascii digits" check where the compiled size of
this check should be much smaller.
2023-10-24 09:17:45 -07:00
Kevin Reid
71c1e59334 docs: Fix doc link to Arg::trailing_var_arg 2023-10-14 18:11:33 -07:00
Ed Page
dfebb54423 style: Make clippy happy 2023-10-12 08:32:59 -05:00
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