Code

bash completion: Add long options for 'git describe'
authorThomas Rast <trast@student.ethz.ch>
Sat, 26 Jul 2008 10:26:56 +0000 (12:26 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Jul 2008 21:14:00 +0000 (14:14 -0700)
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index 40b3d99737536c3cd85dece7b61d62d8977b43aa..2fb88a8feff5dbfa368785e8872b42742b257eec 100755 (executable)
@@ -667,6 +667,15 @@ _git_commit ()
 
 _git_describe ()
 {
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "
+                       --all --tags --contains --abbrev= --candidates=
+                       --exact-match --debug --long --match --always
+                       "
+               return
+       esac
        __gitcomp "$(__git_refs)"
 }