From bc976a913c203d5538ebe8c93e8c168958fcde07 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 13 Mar 2018 13:45:03 +0100 Subject: [PATCH] [git completions] Use staged files for rm --cached --- 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 9d386edd9..d77bf5657 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -876,9 +876,9 @@ complete -f -c git -n '__fish_git_using_command revert' -a '(__fish_git_commits) # TODO options ### rm -complete -c git -n '__fish_git_needs_command' -a rm -d 'Remove files from the working tree and from the index' -complete -c git -n '__fish_git_using_command rm' -l cached -d 'Keep local copies' -complete -c git -n '__fish_git_using_command rm; and __fish_contains_opt -s _ cached' -f -a '(git ls-files)' +complete -c git -n '__fish_git_needs_command' -a rm -d 'Remove files from the working tree and the index' +complete -c git -n '__fish_git_using_command rm' -l cached -d 'Unstage files from the index' +complete -c git -n '__fish_git_using_command rm; and __fish_contains_opt cached' -f -a '(__fish_git_files all-staged)' complete -c git -n '__fish_git_using_command rm' -l ignore-unmatch -d 'Exit with a zero status even if no files matched' complete -c git -n '__fish_git_using_command rm' -s r -d 'Allow recursive removal' complete -c git -n '__fish_git_using_command rm' -s q -l quiet -d 'Be quiet'