[PATCH] mq: enable bash completion for qqueue

Patrick Mézard pmezard at gmail.com
Sun Aug 8 12:14:37 CDT 2010


Le 07/08/10 23:30, Yann E. MORIN a écrit :
> # HG changeset patch
> # User "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
> # Date 1281216624 -7200
> # Node ID c6c64a8a3b113e94c28edb0d2f79b7400eb24336
> # Parent  05deba16c5d571e244364accbde31268008b2e3c
> mq: enable bash completion for qqueue
> 
> Return the list of available queues
> when completion is attempted on qqueue.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
> 
> diff --git a/contrib/bash_completion b/contrib/bash_completion
> --- a/contrib/bash_completion
> +++ b/contrib/bash_completion
> @@ -462,6 +462,21 @@
>      return 1
>  }
>  
> +_hg_cmd_qqueue()
> +{
> +    local q
> +    local -a queues
> +    local -a opts=( "--list" "--create" "--delete" )
> +    local root=$(_hg_cmd root)
> +
> +    for q in $(cd "$root"/.hg && compgen -d -- "patches"); do

Just to make sure I really understand what I read (since I knew nothing about bash completion just 20mn ago), the '--' is not necessary here, right?

--
Patrick Mézard



More information about the Mercurial-devel mailing list