Add --staged to bash completion for git diff
authorKevin McConnell <kevin.mcconnell@gmail.com>
Sat, 21 Mar 2009 23:29:27 +0000 (16:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Mar 2009 00:41:46 +0000 (17:41 -0700)
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>
contrib/completion/git-completion.bash

index ed235f759645c0f657d47b3f0d73a3bcfbf6b1d6..6bc32df1782d055770633522a785025dcd352d09 100755 (executable)
@@ -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
                        "