[PATCH] bash_completion: add completions for shelve extension

Kevin Bullock kbullock at ringworld.org
Tue Sep 29 21:44:57 CDT 2009


Has anyone taken a look at this? Can it be added in?

Pacem in terris / Mir / Shanti / Salaam / Heiwa
Kevin R. Bullock


On 25 Sep 2009, at 11:23 PM, Kevin Bullock wrote:

> # HG changeset patch
> # User Kevin Bullock <kbullock at ringworld.org>
> # Date 1253759387 18000
> # Node ID 7f691058d62965f55051f2a2b253d094a721f1ac
> # Parent  32ec707991726bd58b9190862ab98f204797eea4
> bash_completion: add completions for shelve extension
>
> diff --git a/contrib/bash_completion b/contrib/bash_completion
> --- a/contrib/bash_completion
> +++ b/contrib/bash_completion
> @@ -530,3 +530,20 @@
>      return
>  }
>
> +# shelve
> +_hg_shelves()
> +{
> +    local shelves="$("$hg" unshelve -l . 2>/dev/null)"
> +    local IFS=$'\n'
> +    COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur"))
> +}
> +
> +_hg_cmd_shelve()
> +{
> +    _hg_status "mard"
> +}
> +
> +_hg_cmd_unshelve()
> +{
> +    _hg_shelves
> +}
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list