# HG changeset patch # User "Yann E. MORIN" # Date 2010-08-08 21:10:08 # Node ID dc5ce9c95d004f94733d9dcb81318e9679b6e767 # Parent 9b771b4ce2f349aee70c3a5e4633cb1db2b924d5 mq/qqueue: enable bash completion Return the list of available queues when completion is attempted on qqueue. diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -462,6 +462,17 @@ complete -o bashdefault -o default -F _h 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()