fix: prevent file completions in fish shell for git wt#109
Merged
k1LoW merged 1 commit intok1LoW:mainfrom Feb 5, 2026
Merged
Conversation
Fish's auto-handler for custom git commands calls `complete -C "git-wt ..."` which had no completions registered, causing fish to fall back to file completions. Added completions for the git-wt command directly with exclusive mode (-x) to prevent file completions. Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #108 where Fish shell completion was incorrectly showing files and directories from the current directory alongside worktrees and branches when using git wt commands. The fix adds proper completion handlers to prevent Fish's default file completion behavior.
Changes:
- Added new completion function
__fish_git_wt_direct_completionsfor directgit-wtcommand invocations - Changed completion flag from
-f(force file completion) to-x(exclusive, no file completion) forgit wt - Added completion rule for
git-wtcommand to prevent fallback to Fish's automatic file completion
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
@dgrant GREAT WORK!! Thank you!! |
k1LoW
approved these changes
Feb 5, 2026
Merged
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.
Fixes #108
Fish completion was showing files and directories in the current directory, in addition to worktrees and branches. Added completions for the
git-wtcommand directly to prevent fish's auto-handler from falling back to file completions.Before:
After:
🤖 Generated with Claude Code