Skip to content

[release/10.0.3xx] Enhance fish shell completions with static+dynamic hybrid generation - #53779

Merged
baronfel merged 4 commits into
release/10.0.3xxfrom
backport/pr-53716-to-release/10.0.3xx
Apr 16, 2026
Merged

[release/10.0.3xx] Enhance fish shell completions with static+dynamic hybrid generation#53779
baronfel merged 4 commits into
release/10.0.3xxfrom
backport/pr-53716-to-release/10.0.3xx

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #53716 to release/10.0.3xx

/cc @baronfel@slang25

@github-actionsgithub-actionsBot added the backport PR that has been backported to a servicing branch label Apr 9, 2026
@baronfel
baronfel enabled auto-merge (squash) April 9, 2026 14:26
slang25and others added 4 commits April 16, 2026 09:17
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>
@DonnaChen888
DonnaChen888force-pushed the backport/pr-53716-to-release/10.0.3xx branch from 0518d6d to 0d421acCompareApril 16, 2026 01:17
@baronfel
baronfel merged commit 263b397 into release/10.0.3xxApr 16, 2026
26 of 28 checks passed
@baronfel
baronfel deleted the backport/pr-53716-to-release/10.0.3xx branch April 16, 2026 03:27
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backportPR that has been backported to a servicing branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@baronfel@slang25