cli icon indicating copy to clipboard operation
cli copied to clipboard

Fish completion now supports dynamic completions

Open bittrance opened this issue 7 months ago • 0 comments

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.

bittrance avatar May 23 '25 21:05 bittrance