Skip to content

Commit ebd15bf

Browse files
kevinmcconnellgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 26284f9 commit ebd15bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ _git_diff ()
899899
local cur="${COMP_WORDS[COMP_CWORD]}"
900900
case "$cur" in
901901
--*)
902-
__gitcomp "--cached --pickaxe-all --pickaxe-regex
902+
__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
903903
--base --ours --theirs
904904
$__git_diff_common_options
905905
"

0 commit comments

Comments
 (0)