[release/10.0.3xx] Enhance fish shell completions with static+dynamic hybrid generation#53779
Merged
baronfel merged 4 commits intorelease/10.0.3xxfrom Apr 16, 2026
Merged
Conversation
baronfel
approved these changes
Apr 9, 2026
Replace the fish shell provider's simple dynamic one-liner with a full static+dynamic completion generator, matching the approach taken by the Bash, Zsh, and PowerShell providers. The generated script uses a state-machine that walks the tokenized command line to determine the current subcommand context, then emits static completions for subcommands, options, and positional arguments — falling back to dynamic complete calls where IsDynamic is set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Handle options with arity > 1 (bounded and unbounded) in the fish shell state walker and option value completions. Fix fish seq warning when token count is less than 2 by guarding the scan-back loop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…kups Address review feedback: remove dead `set -l current` variable from generated fish script, and replace O(n²) states.First() lookups with a pre-built Dictionary<Command, int> for O(1) state ID resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change UnboundedArityThreshold from 100 to 100_000 to match the actual sentinel value used by System.CommandLine for ZeroOrMore/OneOrMore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0518d6d to
0d421ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #53716 to release/10.0.3xx
/cc @baronfel @slang25