Skip to content

Mirror excerpt completion across shells (#1525) - #2166

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue1525
May 15, 2026
Merged

Mirror excerpt completion across shells (#1525)#2166
Widthdom merged 2 commits into
mainfrom
fix-issue1525

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Add --start / --end to the fish completion script for the excerpt subcommand so fish users get the same suggestions bash and zsh already provide for the documented excerpt <path> --start <line> [--end <line>] signature.
  • Add PrintCompletions_ExcerptFlagSetsMatchAcrossShells to lock in parity between the bash, zsh, and fish flag sets for excerpt, so future drift in any one shell is caught at build time.
  • Add a bilingual changelog fragment under changelog.d/unreleased/1525.fixed.md.

Notes

  • The original issue's evidence (ConsoleUi.cs:589-631 — bash-completion table for excerpt omits the two flags) is outdated: bash already enumerates --focus-column / --focus-length (and a regression guard in PrintCompletions_BashAndZshKeepFocusOptionsExcerptOnly already asserts that). The actual parity gap was on the fish side (--start / --end), which the new test now also covers.

Test plan

  • dotnet build CodeIndex.sln -c Release
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --filter FullyQualifiedName~ConsoleUiTests (39 passed)
  • dotnet test CodeIndex.sln -c Release (4590 passed, 3 skipped — perf tests)
  • dotnet run --project tools/CodeIndex.Changelog -- check (33 fragments validated)

Fixes #1525

Widthdom added 2 commits May 15, 2026 20:56
The bash and zsh completion scripts already enumerated every excerpt
flag, but the fish completion omitted --start / --end so fish users got
no suggestion when typing those prefixes after `excerpt`.

Add the two flags to GetFishCompletions and a new
PrintCompletions_ExcerptFlagSetsMatchAcrossShells test that parses each
shell's completion output for the excerpt branch and asserts the bash,
zsh, and fish flag sets are identical (modulo the universal --help).

Fixes #1525
@Widthdom
Widthdom merged commit ee23994 into main May 15, 2026
7 checks passed
@Widthdom
Widthdom deleted the fix-issue1525 branch May 15, 2026 12:37
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.

Bash completion script omits --focus-column / --focus-length flags

1 participant