1
0
mirror of https://github.com/git/git.git synced 2024-10-20 22:48:24 +02:00

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>
This commit is contained in:
Kevin McConnell 2009-03-21 16:29:27 -07:00 committed by Junio C Hamano
parent 26284f9356
commit ebd15bf0d7

@ -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
"