changeset 11768:dc5ce9c95d00

mq/qqueue: enable bash completion Return the list of available queues when completion is attempted on qqueue.
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
date Sun, 08 Aug 2010 23:10:08 +0200
parents 9b771b4ce2f3
children 4b8dc59e22b9
files contrib/bash_completion
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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()