Commit graph

111 commits

Author SHA1 Message Date
renovate[bot]
a2aa644368
chore(deps): update compatible (dev) (#5381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 00:16:52 +00:00
Ed Page
fba7c8597b test(complete): Show newline issue 2024-02-16 16:16:36 -06:00
Ed Page
5f9cecb6bd chore: Update snapbox/trycmd 2024-02-14 16:44:57 -06:00
Ed Page
a751c5fe65 chore: Release 2024-02-08 10:34:06 -06:00
Ed Page
0735119775 docs: Update changelog 2024-02-08 10:32:13 -06:00
renovate[bot]
4788918e01
chore(deps): update compatible (dev) (#5333)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-01 01:26:55 +00:00
renovate[bot]
924b2524d0
chore(deps): update compatible (dev) (#5276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 01:44:12 +00:00
renovate[bot]
14fd853fb9
chore(deps): update compatible (dev) (#5192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-01 01:03:46 +00:00
Ed Page
9bfa5a338c chore: Release 2023-10-24 13:25:07 -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
e6e539660f chore: Release 2023-09-18 09:28:47 -06: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
2e49645418 chore: Release 2023-08-24 11:08:02 -05:00
Ed Page
7224e5044e docs: Update changelog 2023-08-24 11:06:00 -05:00
Ed Page
50f0e6bffb chore: Release 2023-06-01 21:10:46 -05:00
renovate[bot]
534be345d8
chore(deps): update compatible (dev) 2023-06-01 00:38:25 +00:00
Ed Page
9c3dc187cb chore: Release 2023-05-19 11:55:42 -05:00
Yuri Astrakhan
d0302c5556 chore: Inline simple non-mixed format args 2023-05-04 15:58:04 -04:00
Ed Page
8fc65e28b6 chore: Release 2023-03-28 02:19:08 -05:00
Ed Page
e78bba0ec5 chore: Release 2023-03-16 10:42:06 -05:00
Ed Page
6c0600a031 chore: Fully specify dependencies 2023-03-16 06:07:08 -05:00
Ed Page
fb9435d026 chore: Release 2023-02-15 10:27:15 -06:00
Martin
704d0e7a4f chore: Make format!() calls more readable 2023-01-29 19:14:47 +00:00
Ed Page
34d856b449 chore: Release 2023-01-13 09:27:31 -06:00
Ed Page
889ca7a537 chore: Bump versions for 4.1 2023-01-13 09:24:37 -06:00
Ed Page
a41ca2edb0 docs: Update changelog 2023-01-13 07:13:28 -06:00
Ed Page
fa02111092 chore: Switch to workspace inheritance 2023-01-09 12:35:54 -06:00
Ed Page
f25fe5b3e0 chore: Bump MSRV to 1.64.0 2023-01-09 12:29:41 -06:00
Ed Page
36bc641648 fix(help): Remove extraneous text from built-ins
This is an intermediate solution for #4408.  As there were no agreeed
upon goals, I went with what I felt read well and that I saw commonly
used on non-clap commands.

- "information" isn't really a necessary word.
- I originally favored `Print this help` but realied that doesn't read
  correctly in completions.
- Besides being shorter, the reason for the flipped short/long hint is
  it gives people the context they need for scanning, emphasizing
  "summary" and "more".

Fixes #4409
2023-01-03 11:02:26 -06:00
Ed Page
3262016c26 chore: Release 2022-11-24 11:40:15 -06:00
Ed Page
623ccbc152 style: Make clippy happy 2022-11-24 08:05:21 -06:00
Ed Page
996636d56f chore: Release 2022-10-18 14:37:53 -05:00
Ed Page
3e23cd102f fix: Require release versions of clap 2022-10-18 14:36:44 -05:00
dependabot[bot]
f0d971562a
chore(deps): bump snapbox from 0.3.3 to 0.4.0
Bumps [snapbox](https://github.com/assert-rs/trycmd) from 0.3.3 to 0.4.0.
- [Release notes](https://github.com/assert-rs/trycmd/releases)
- [Changelog](https://github.com/assert-rs/trycmd/blob/main/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/trycmd/compare/snapbox-v0.3.3...snapbox-v0.4.0)

---
updated-dependencies:
- dependency-name: snapbox
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 18:58:27 +00:00
Ed Page
3a74d82376 chore: Release 2022-09-28 12:00:48 -05:00
Ed Page
a82029c707 chore: Release 2022-09-20 16:30:29 -05:00
Ed Page
7a5dad89ff feat(help): Break out help feature flag
This removes auto-generated help, saving about 50 KiB.
2022-09-19 11:54:10 -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
6bd4fee69f chore: Update dependencies 2022-09-01 07:09:32 -05:00
Andrew Shu
eec047a6f6 fix(help): Do not propagate global args to help
This prevents global args from showing in help completions,
since help completions should only suggest subcommands.
Adds tests to ensure the args still show in the generated
help messages of subcommands.
2022-08-26 17:48:58 -07:00
Andrew Shu
0d0be51606 fix(complete): Fix help completion issues
* Copy hide flag

* Revert global args special handling. Another commit will
address the issue of whether global args should be included in
help subtrees.
2022-08-26 12:57:12 -07:00
Andrew Shu
729406661c refactor(complete): Clean up help completion
* Manual subtree copy to ensure correct behavior and settings
* Always set ExpandHelpSubcommandTrees in Command::build
* Remove redundant logic
2022-08-25 15:43:27 -07:00
Andrew Shu
fdcee9313f feat(complete): Add completion for help subcommands
Adds parser flags to toggle whether to run the
expensive clone logic for completions case.

Help completion will only suggest subcommands, not args.

clap_complete generator sets the flag.
2022-08-25 13:58:08 -07:00
Ed Page
c6155f62d5 feat: Open the door for user styling in the future
This added about 10 KiB to the `.text` which I cannot explain why
2022-08-24 18:17:42 -05:00
Ed Page
1bbf07e574 fix: Prefer more usable &str for reflection
The downside is we can't skip allocations with
- `ValueEnum` default values
- Vaid subcommands

Otherwise, this is a big ergonomic win.
2022-08-22 14:56:16 -05:00
Ed Page
85f541d789 fix: Switch to owned types
Impact:
- Binary size: 556.6 KiB to 578.4 KiB
- build time: 6.4950 us (7% slower)
- parse time: 7.7256 us
- parse sc time: 8.1580 us (5% faster)

Fixes #1041
Fixes #2150
2022-08-22 14:55:55 -05:00
grant0417
fedda32167 feat(fig): escape all strings 2022-08-21 00:46:32 -07:00
Ed Page
3390adf0d3 chore: Bump MSRV to 1.60.0
While at it, this cleans up all of the features.  For some reason, I
couldn't do `dep:clap_derive` though.
2022-08-10 21:32:06 -05:00
Ed Page
f70ebe89a7 fix!: Require explicit help/version disabling
Before we introduced actions, it required specific setups to engage with
claps version and help printing.  With actions making that more
explicit, we don't get as much benefit from our multiple, obscure, ways
of users customizing help

Before
- Modify existing help or version with `mut_arg` which would
  automatically be pushed down the command tree like `global(true)`
- Create an new help or version and have it treated as if it was the
  built-in on (I think)
- Use the same flags as built-in and have the built-in flags
  automatically disabled
- Users could explicitly disable the built-in functionality and do what
  they want

Now
- `mut_arg` no longer works as we define help and version flags at the
  end
- If someone defines a flag that overlaps with the built-ins by id,
  long, or short, a debug assert will tell them to explicitly disable
  the built-in
- Any customization has to be done by a user providing their own.  To
  propagate through the command tree, they need to set `global(true)`.

Benefits
- Hopefully, this makes it less confusing on how to override help
  behavior.  Someone creates an arg and we then tell them how to disable
  the built-in
- This greatly simplifies the arg handling by pushing more
  responsibility onto the developer in what are hopefully just corner
  cases
- This removes about 1Kb from .text

Fixes #3405
Fixes #4033
2022-08-10 20:33:21 -05:00
Ed Page
64639aa81c style: Make clippy happy 2022-08-10 11:41:27 -05:00