8000 Fish completions with identically named sub-commands now work by bittrance · Pull Request #2130 · urfave/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fish completions with identically named sub-commands now work #2130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2025

Conversation

bittrance
Copy link
Contributor

What type of PR is this?

  • bug

What this PR does / why we need it:

Previously, completions for foo bar -- and baz bar -- would include flags from both sub-commands because they would only match on "bar". This is now fixed by including the full ancestry in the complete instructions.

Which issue(s) this PR fixes:

Fixes #2115.

Testing

Before:

$ mycli more-awesome set -- <tab>
--decrease  --help  (show help)  --increase
$ mycli less-awesome set -- <tab>
--decrease  --help  (show help)  --increase

After:

$ mycli more-awesome set -- <tab>
--help  (show help)  --increase
$ mycli less-awesome set -- <tab>
--decrease  --help  (show help)

Release Notes

Fish completions no longer conflate options from identically-named sub-commands.

…dentical names.

Previously, completions for [foo bar --] and [baz bar --] would include
flags from both subcommands because they would only match on "bar". This
is now fixed by including the full ancestry.
@bittrance bittrance requested a review from a team as a code owner May 11, 2025 09:51
Co-authored-by: Eng Zer Jun <engzerjun@gmail.com>
@bittrance bittrance force-pushed the fish-completion-conflation branch from 114931e to 0edd038 Compare May 21, 2025 21:26
@dearchap dearchap merged commit cb0fc21 into urfave:main May 22, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v3 fish completions conflate 2+ level subcommand options
3 participants
0