@matheusbsbs / matheus-bagliano / commits / ebd15bf0d7
Fork 0

Add --staged to bash completion for git diff

The --staged option (synonym for --cached) isn't listed in the completion choices for git diff. This tiny patch adds it. Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kevin McConnell committed Mar 21, 2009 at 16:29 UTC ebd15bf0d732db7dec4cfd8bbfa2c7430b6e875c
1 file changed +1 -1
contrib/completion/git-completion.bash
+1 -1
@@ -899,7 +899,7 @@ _git_diff ()
899 local cur="${COMP_WORDS[COMP_CWORD]}"
900 case "$cur" in
901 --*)
902 - __gitcomp "--cached --pickaxe-all --pickaxe-regex
902 + __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
903 --base --ours --theirs
904 $__git_diff_common_options
905 "