Patchwork bash_completion: add -l|--list support for shelve

login
register
mail settings
Submitter Sean Farley
Date June 6, 2014, 1:03 p.m.
Message ID <eaa26f2bd301a9e9cf76.1402059837@laptop.local>
Download mbox | patch
Permalink /patch/4944/
State Accepted
Headers show

Comments

Sean Farley - June 6, 2014, 1:03 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1402032106 18000
#      Fri Jun 06 00:21:46 2014 -0500
# Node ID eaa26f2bd301a9e9cf76d1bc00997d0969da62d8
# Parent  5b2a2bea8cb68b5af10b96558dbfa8f1ec699efe
bash_completion: add -l|--list support for shelve

This was overlooked previously and found via 'hg shelve -p -l <tab>' (to show
the diff of the shelved commit).
Pierre-Yves David - June 6, 2014, 5:59 p.m.
On 06/06/2014 06:03 AM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@gmail.com>
> # Date 1402032106 18000
> #      Fri Jun 06 00:21:46 2014 -0500
> # Node ID eaa26f2bd301a9e9cf76d1bc00997d0969da62d8
> # Parent  5b2a2bea8cb68b5af10b96558dbfa8f1ec699efe
> bash_completion: add -l|--list support for shelve

Clowncopterized, thanks

(queued)


>
> This was overlooked previously and found via 'hg shelve -p -l <tab>' (to show
> the diff of the shelved commit).
>
> diff --git a/contrib/bash_completion b/contrib/bash_completion
> --- a/contrib/bash_completion
> +++ b/contrib/bash_completion
> @@ -627,11 +627,11 @@ complete -o bashdefault -o default -o no
>       COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur"))
>   }
>
>   _hg_cmd_shelve()
>   {
> -    if [[ "$prev" = @(-d|--delete) ]]; then
> +    if [[ "$prev" = @(-d|--delete|-l|--list) ]]; then
>           _hg_shelves
>       else
>           _hg_status "mard"
>       fi
>   }
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -627,11 +627,11 @@  complete -o bashdefault -o default -o no
     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur"))
 }
 
 _hg_cmd_shelve()
 {
-    if [[ "$prev" = @(-d|--delete) ]]; then
+    if [[ "$prev" = @(-d|--delete|-l|--list) ]]; then
         _hg_shelves
     else
         _hg_status "mard"
     fi
 }