mq/qqueue: enable bash completion
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun, 08 Aug 2010 23:10:08 +0200
changeset 11768 dc5ce9c95d00
parent 11767 9b771b4ce2f3
child 11770 4b8dc59e22b9
mq/qqueue: enable bash completion Return the list of available queues when completion is attempted on qqueue.
contrib/bash_completion
--- a/contrib/bash_completion	Sun Aug 08 22:49:01 2010 +0200
+++ b/contrib/bash_completion	Sun Aug 08 23:10:08 2010 +0200
@@ -462,6 +462,17 @@
     return 1
 }
 
+_hg_cmd_qqueue()
+{
+    local q
+    local queues
+    local opts="--list --create --delete"
+
+    queues=$( _hg_cmd qqueue --quiet )
+
+    COMPREPLY=( $( compgen -W "${opts} ${queues}" "${cur}" ) )
+}
+
 
 # hbisect
 _hg_cmd_bisect()