Code

bash: add git-branch options
authorSZEDER Gábor <szeder@ira.uka.de>
Tue, 4 Mar 2008 18:00:58 +0000 (19:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Mar 2008 20:10:29 +0000 (12:10 -0800)
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index 8f70e1efc11553ce2360fab8693e2749a3fc36b4..8d6733abe4063cebbb0ac2d6e020077ed78fe438 100755 (executable)
@@ -506,7 +506,16 @@ _git_bisect ()
 
 _git_branch ()
 {
-       __gitcomp "$(__git_refs)"
+       case "${COMP_WORDS[COMP_CWORD]}" in
+       --*=*)  COMPREPLY=() ;;
+       --*)
+               __gitcomp "
+                       --color --no-color --verbose --abbrev= --no-abbrev
+                       --track --no-track
+                       "
+               ;;
+       *)      __gitcomp "$(__git_refs)" ;;
+       esac
 }
 
 _git_bundle ()