Patchwork [V2,2/2] bash_completion: recognize the --output option

login
register
mail settings
Submitter Ahmed S. Darwish
Date July 1, 2013, 4:30 p.m.
Message ID <20130701163041.GB10595@darwish>
Download mbox | patch
Permalink /patch/1777/
State Changes Requested, archived
Headers show

Comments

Ahmed S. Darwish - July 1, 2013, 4:30 p.m.
# HG changeset patch
# User Ahmed S. Darwish <a.darwish@vireton.com>
# Date 1372695308 -7200
# Node ID 97c5442d88a5df004d3c48a16461e549db57b3c7
# Parent  c1aa2fdfc7b7a8fff58b192259dcdf4f74f7ada7
bash_completion: recognize the --output option

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

Patch

diff -r c1aa2fdfc7b7 -r 97c5442d88a5 contrib/bash_completion
--- a/contrib/bash_completion	Mon Jul 01 18:13:30 2013 +0200
+++ b/contrib/bash_completion	Mon Jul 01 18:15:08 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