Patchwork [2,of,2] completion: recognize the --output option

login
register
mail settings
Submitter Ahmed S. Darwish
Date June 28, 2013, 8:13 p.m.
Message ID <20130628201331.GB6043@Darwish.PC>
Download mbox | patch
Permalink /patch/1756/
State Superseded
Headers show

Comments

Ahmed S. Darwish - June 28, 2013, 8:13 p.m.
# HG changeset patch
# User Ahmed S. Darwish <darwish.07@gmail.com>
# Date 1372449143 -7200
# Node ID d170fb7198f2bdeb7e44a999e9395efb52eb99ec
# Parent  3466620d7f96769c469f7e42b08f1ca3d53feb86
completion: recognize the --output option

`--output <TAB>' now only lists the repository untracked files.

exporting patch:
<fdopen>
Nikolaj Sjujskij - June 28, 2013, 8:19 p.m.
Den 2013-06-29 00:13:31 skrev Ahmed S. Darwish <darwish.07@gmail.com>:

> # HG changeset patch
> # User Ahmed S. Darwish <darwish.07@gmail.com>
> # Date 1372449143 -7200
> # Node ID d170fb7198f2bdeb7e44a999e9395efb52eb99ec
> # Parent  3466620d7f96769c469f7e42b08f1ca3d53feb86
> completion: recognize the --output option
  It's *bash*_completion.

> `--output <TAB>' now only lists the repository untracked files.
>
> diff -r 3466620d7f96 -r d170fb7198f2 contrib/bash_completion
> --- a/contrib/bash_completion	Fri Jun 28 21:50:51 2013 +0200
> +++ b/contrib/bash_completion	Fri Jun 28 21:52:23 2013 +0200
> @@ -255,7 +255,11 @@
>  	    _hg_debugpathcomplete -fa
>  	;;
>  	diff)
> -	    _hg_status "mar"
> +	    if [[ "$prev" = @(-o|--output) ]]; then
> +	     	_hg_status "u"
> +	    else
> +		_hg_status "mar"
> +	    fi
>  	;;
>  	revert)
>  	    _hg_debugpathcomplete
> exporting patch:
> <fdopen>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff -r 3466620d7f96 -r d170fb7198f2 contrib/bash_completion
--- a/contrib/bash_completion	Fri Jun 28 21:50:51 2013 +0200
+++ b/contrib/bash_completion	Fri Jun 28 21:52:23 2013 +0200
@@ -255,7 +255,11 @@ 
 	    _hg_debugpathcomplete -fa
 	;;
 	diff)
-	    _hg_status "mar"
+	    if [[ "$prev" = @(-o|--output) ]]; then
+	     	_hg_status "u"
+	    else
+		_hg_status "mar"
+	    fi
 	;;
 	revert)
 	    _hg_debugpathcomplete