From 7ddc8ee195c223fae5e42f34a8477b8df54d3583 Mon Sep 17 00:00:00 2001 From: Harry Garrood Date: Thu, 21 May 2026 17:14:12 +0100 Subject: [PATCH] git completion: only suggest files/directories with --no-index Fixes #12773. Closes #12776 --- share/completions/git.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index 81086b471..606070319 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -1563,11 +1563,11 @@ complete -f -c git -n '__fish_git_using_command describe' -l first-parent -d 'Fo ### diff complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits and working tree' -complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_ranges)' -complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_complete_stashes)' +complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -xpc)' -n 'not __fish_git_contains_opt no-index' -ka '(__fish_git_ranges)' +complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -xpc)' -n 'not __fish_git_contains_opt no-index' -ka '(__fish_git_complete_stashes)' begin set -lx __fish_git_recent_commits_arg --all - __fish_git_add_revision_completion -n '__fish_git_using_command diff' + __fish_git_add_revision_completion -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt no-index' end complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index' complete -c git -n '__fish_git_using_command diff' -l staged -d 'Show diff of changes in the index'