Commit graph

7814 commits

Author SHA1 Message Date
Pawel Zmarzly
5000d58f38 feat(complete): Add autocomplete for visible_alias
Let's generate autocompletions for aliased subcommands.

    $ source before.zsh
    $ clap-test [TAB] <- gives me "foo bar --"
    $ clap-test foo [TAB] <- gives me "--my-flag"
    $ clap-test bar [TAB] <- no reaction

    $ source after.zsh
    $ clap-test [TAB] <- gives me "foo bar --"
    $ clap-test foo [TAB] <- gives me "--my-flag"
    $ clap-test bar [TAB] <- gives me "--my-flag"
2024-05-17 15:17:44 +01:00
Pawel Zmarzly
be15bd5d96 fix(complete): Fix zsh.rs subcommand deduplication
Fixing the iteration over all_subcommands in zsh.rs. We deduplicate
values on (sc_name, bin_name) keys, but then only iterate on bin_name.
This doesn't cause problems now, since all bin names seem to be unique.
However, without fixing this, the next commit would have started
generating duplicated functions with same names.

For example, with an #[long = "foo", visible_alias = "bar"] subcommand,
we'll end up with 2 pairs: [("foo", "foo"), ("bar", "foo")]. Before this
commit, we would have ended up generating _my-app__foo_commands()
functions. These functions should have identical content, so it is not
an error, just an inefficiency that we can fix.
2024-05-17 15:16:43 +01:00
renovate[bot]
5be548dd54
chore(deps): Update Rust Stable to v1.78 (#5493)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-14 19:13:06 +00:00
Ed Page
958c749e61 style: Make clippy happy 2024-05-14 14:06:10 -05:00
Ed Page
10a62de4cb
Merge pull request #5494 from epage/next
fix(help): Take long_help into account for next_line_help detection
2024-05-14 14:04:39 -05:00
Ed Page
22148eb87d fix(help): Take long_help into account for next_line_help detection 2024-05-14 13:53:17 -05:00
Ed Page
88fb46ef3e
Merge pull request #5492 from epage/template
chore: Update template
2024-05-14 13:46:37 -05:00
Ed Page
800d7cb8ad chore: Update from template 2024-05-14 12:27:02 -05:00
Ed Page
7d3a380b3d docs(ref): Clean up default_missing_value grammar 2024-05-03 10:59:45 -05:00
Ed Page
11ff6ccb0d docs(ref): Clarify Count starts from 0 2024-05-03 10:59:45 -05:00
Ed Page
d681a81dd7
Merge pull request #5478 from tyilo/remove-max-values-doc
Remove max_values from derive docs
2024-05-01 09:26:11 -05:00
Asger Hautop Drewsen
b44aa4797d docs: Remove max_values from derive docs 2024-05-01 16:14:36 +02:00
renovate[bot]
24651fcfef
chore(deps): update compatible (dev) (#5477)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 01:04:57 +00:00
Ed Page
51de731521 chore(ci): Lint clippy::items_after_statements seems too strict 2024-04-26 15:59:46 -05:00
Ed Page
181a2cf5e6 chore(ci): Allow prelude wildcard imports 2024-04-26 11:36:19 -05:00
Ed Page
82cf9a62b0 chore(ci): Reduce noisy lints 2024-04-26 09:35:55 -05:00
Ed Page
a01f25da96 chore(ci): Reduce noisy lints
Want to add this back in later but this is slowing down migration of my
repos.
2024-04-26 09:23:28 -05:00
Ed Page
be30b1bba0 chore(ci): Try again with not auto-updating MSRV
The overhead for MSRV bumping is a lot lower and its annoying merging
all of the PRs (and I don't want these auto-merged)
2024-04-26 09:20:18 -05:00
Ed Page
43efde98ec
Merge pull request #5474 from Will-Low/Docstring
Update doctring for BoolishValueParser::new
2024-04-23 14:26:42 -05:00
Will-Low
41c0d514bc Update doctring for BoolishValueParser::new 2024-04-23 12:14:42 -07:00
Ed Page
2671fc1a2c
Merge pull request #5470 from joe-saronic/patch-1
Pretty sure that apostrophe does not belong
2024-04-22 12:28:20 -05:00
Joe
2fae8fe4c9
Pretty sure that apostrophe does not belong 2024-04-22 12:20:23 -05:00
Ed Page
5ba67148de
Merge pull request #5468 from klensy/clone-me
chore(derive): remove useless clones
2024-04-22 11:40:36 -05:00
klensy
1a358881da chore(derive): Remove useless clones 2024-04-22 19:02:59 +03:00
Ed Page
14225df351 chore(ci): Auto-merge linter version updates 2024-04-16 21:46:56 -05:00
Ed Page
0cd10d19f0
Merge pull request #5456 from zippy-dice/fix-doc
docs(examples): Add examples of same names multiple options.
2024-04-15 12:52:16 -05:00
zippy-dice
62a5af66eb docs(example): Update builder examples to keep in sync with derive examples 2024-04-16 02:20:41 +09:00
zippy-dice
d9081f3dce docs(exmaples): Fix example to better align with intended use case 2024-04-16 02:11:09 +09:00
zippy-dice
a9ccb3edb5 docs(exmaples): Drop syntax variants. 2024-04-16 00:49:59 +09:00
zippy-dice
f3de5079d6 docs(examples): Add examples of same names multiple options. 2024-04-15 23:04:52 +09:00
Ed Page
7cbdb0755e
Merge pull request #5451 from clap-rs/gh-sponsor
Add Github Sponsors on this repo
2024-04-11 18:41:44 -05:00
Kevin K
65b915de75
chore: Add Github Sponsors on this repo 2024-04-11 19:34:51 -04:00
Ed Page
3092aa4a0d chore: Release 2024-04-09 12:08:43 -05:00
Ed Page
dc333288ec docs: Update changelog 2024-04-09 12:08:33 -05:00
Ed Page
a78b9533a7
Merge pull request #5444 from sudotac/fix-broken-completion-on-bash-4.0
fix(complete): Avoid use of -v in bash completion
2024-04-09 12:06:33 -05:00
Ed Page
93d40450f7 docs: Fix typo 2024-04-09 12:05:12 -05:00
sudotac
cd82f8cc8e fix(complete): Avoid use of -v in bash completion
Because -v is not supported below bash 5.0.
2024-04-07 23:19:50 +09:00
Ed Page
afd275590c chore(ci): Don't block on Lint Commits 2024-04-01 12:36:16 -05:00
Ed Page
2570b58a0f chore(ci): Skip branch protections 2024-04-01 12:31:49 -05:00
Ed Page
dc3e937fc6
Merge pull request #19 from epage/t
chore(ci): Ensure CI job always runs
2024-04-01 11:59:08 -05:00
Ed Page
d634de649f chore(ci): Ensure CI job always runs 2024-04-01 11:36:58 -05:00
Ed Page
3278d49444 chore: Allow print in tests 2024-04-01 10:35:16 -05:00
Ed Page
ebc70d00f9 chore: Only check missing_docs in lib
This also fires in examples and other places.

While docs in examples would be nice,
it isn't universally applicable and `allow`s would undermine the
examples.
2024-04-01 09:11:24 -05:00
Ed Page
a516bda4ad chore: Drop workspace.dependencies
Without automated checks, this will make it harder to track breaking
changes.
2024-04-01 08:58:36 -05:00
renovate[bot]
9d14f394ba
chore(deps): update compatible (dev) (#5438)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 00:30:25 +00:00
Ed Page
99e034bbbb chore: Move print lints to lib.rs
While there is a config for ignoring these in tests, it doesn't help
with examples.
2024-03-28 15:10:58 -05:00
Ed Page
8d4b1b6c8d chore: Remove clippy::tests_outside_test_module
See https://github.com/rust-lang/rust-clippy/issues/11024
2024-03-28 13:24:28 -05:00
Ed Page
6a9d2bf50f chore: Don't warn on unsafe
This works well when a package is a safe abstraction but to universally
apply in a template to all members of a workspace doesn't make sense.
2024-03-28 12:45:57 -05:00
Ed Page
314eef7f5f chore: Dont check must_use
See https://github.com/rust-lang/rust-clippy/issues/8339
2024-03-28 10:38:57 -05:00
Ed Page
2714cca7c3 chore(ci): Don't check for unused crates 2024-03-28 09:58:31 -05:00