From: Kevin McConnell Date: Sat, 21 Mar 2009 23:29:27 +0000 (-0700) Subject: Add --staged to bash completion for git diff X-Git-Tag: v1.6.3-rc0~113 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ebd15bf0d732db7dec4cfd8bbfa2c7430b6e875c;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index ed235f759..6bc32df17 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -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 "