contrib/bash_completion
changeset 18790 1e28a7f58f33
parent 18789 fff3a8114510
child 18793 a821ec835223
--- a/contrib/bash_completion	Thu Mar 21 09:13:16 2013 -0700
+++ b/contrib/bash_completion	Thu Mar 21 10:51:18 2013 -0700
@@ -88,20 +88,6 @@
     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur"))
 }
 
-_hg_tags()
-{
-    local tags="$(_hg_cmd tags -q)"
-    local IFS=$'\n'
-    COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$tags' -- "$cur"))
-}
-
-_hg_branches()
-{
-    local branches="$(_hg_cmd branches -q)"
-    local IFS=$'\n'
-    COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$branches' -- "$cur"))
-}
-
 _hg_bookmarks()
 {
     local bookmarks="$(_hg_cmd bookmarks -q)"
@@ -111,9 +97,9 @@
 
 _hg_labels()
 {
-    _hg_tags
-    _hg_branches
-    _hg_bookmarks
+    local labels="$(_hg_cmd debuglabelcomplete "$cur")"
+    local IFS=$'\n'
+    COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$labels' -- "$cur"))
 }
 
 # this is "kind of" ugly...