Skip to content

Fix shell completion value metadata - #5007

Merged
Widthdom merged 1 commit into
mainfrom
fix-issue4902
Jul 31, 2026
Merged

Fix shell completion value metadata#5007
Widthdom merged 1 commit into
mainfrom
fix-issue4902

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Separate display metavariables from canonical completion value kinds and finite domains in CliFlagSchema.
  • Generate Bash, Zsh, Fish, and PowerShell value completions from the shared metadata, including dynamic language/kind aliases, command-specific domains, contextual path completion, and the mixed --open-issues github + file behavior.
  • Add cross-shell regression contracts, bilingual user/developer documentation, and a bilingual changelog fragment.

Root cause

Pipe-separated help placeholders were treated as exhaustive enum domains. Mixed and free-form metavariables such as <name|path> and <path|github|github:owner/name> therefore leaked into generated shell completion candidates as literal values.

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore — passed with 0 warnings and 0 errors.
  • Focused CliFlagSchemaTests|ConsoleUiTests on net8.0 and net9.0 — 301 passed on each target framework.
  • Full net8.0 suite on latest origin/main — 11,008 passed, 7 skipped, 0 failed.
  • Full net9.0 suite on latest origin/main — 10,533 passed, 420 skipped; one unrelated high-load MCP audit test failed only during concurrent dual-TFM execution and passed the immediate bounded isolated retry (1/1). A prior sequential full net9.0 run also completed without failures.
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore — passed.
  • dotnet run --project tools/CodeIndex.Changelog -c Release --no-build -- check — validated 78 fragments.
  • Generated Bash and Zsh scripts passed syntax checks; generated PowerShell parsed successfully. Fish source contracts passed (Fish is not installed locally).
  • PowerShell smoke checks verified nested relative paths, mixed github + file candidates, and quoted paths containing spaces.
  • Local index refreshed against the final commit; status --check --json reports index_matches_workspace: true.

Adversarial review

Ran the required Codex adversarial review for two rounds. Addressed both actionable findings: Fish now consumes command-specific value domains, and PowerShell delegates path values to its native filename completer so nested path prefixes and quoting are preserved.

Fixes #4902

@Widthdom
Widthdom marked this pull request as ready for review July 31, 2026 08:47
@Widthdom
Widthdom merged commit 1437ebe into main Jul 31, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4902 branch July 31, 2026 08:47
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.

Do not emit option metavariables as shell-completion enum values

1 participant