Skip to content

Commit

Permalink
Add --staged to bash completion for git diff
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin McConnell authored and Junio C Hamano committed Mar 23, 2009
1 parent 26284f9 commit ebd15bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
"
Expand Down

0 comments on commit ebd15bf

Please sign in to comment.