Skip to content

Fish completion now supports dynamic completions - #2144

Draft
bittrance wants to merge 1 commit into
urfave:mainfrom
bittrance:fish-completion-dynamic-completions
Draft

bittrance wants to merge 1 commit into
urfave:mainfrom
bittrance:fish-completion-dynamic-completions

Conversation

@bittrance

Copy link
Copy Markdown
Contributor

Leaving this PR as draft for the moment as I presume there will be nuances once I start using it in my own project.

What type of PR is this?

  • feature

What this PR does / why we need it:

This PR delegates to the completion flag strategy when the command has a ShellComplete function. This hybrid strategy builds on the assumption that it is cheaper (better ux) to use fish built-in completion when possible and only invoke the binary with completion flag when necessary.

Special notes for your reviewer:

This PR removes the blanket application of the default shell completion and instead invokes it command.ShellComplete == nil. I don't think this is an issue, but it does change the contract slightly.

Release Notes

Fish completion now supports dynamic completions.

@meatballhat meatballhat added kind/feature describes a code enhancement / feature request area/v3 relates to / is being considered for v3 labels Jun 14, 2025

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/v3 relates to / is being considered for v3 kind/feature describes a code enhancement / feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants