Browse Source

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>
maint
Kevin McConnell 16 years ago committed by Junio C Hamano
parent
commit
ebd15bf0d7
  1. 2
      contrib/completion/git-completion.bash

2
contrib/completion/git-completion.bash

@ -899,7 +899,7 @@ _git_diff () @@ -899,7 +899,7 @@ _git_diff ()
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--*)
__gitcomp "--cached --pickaxe-all --pickaxe-regex
__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
--base --ours --theirs
$__git_diff_common_options
"

Loading…
Cancel
Save