[PATCH] bash/zsh completion: use HGPLAIN when invoking hg (issue2297)

Dan Villiom Podlaski Christiansen danchr at gmail.com
Wed Jul 21 18:18:39 CDT 2010


On 21 Jul 2010, at 23:13, Brodie Rao wrote:

> +_hg_cmd()
> +{
> +    HGPLAIN= "$hg" "$@" 2>/dev/null
> +}
> +

Wouldn't it be clearer to set HGPLAIN=1? To a casual observer, the above code could be read as unsetting HGPLAIN, although that isn't what it does.

> _hg_cmd() {
> -  _call_program hg hg --config ui.verbose=0 --config defaults."$1"= \
> -    "$_hg_cmd_globals[@]" "$@" 2> /dev/null
> +  _call_program hg HGPLAIN= hg "$_hg_cmd_globals[@]" "$@" 2> /dev/null
> }

Same here.

--

Dan Villiom Podlaski Christiansen
danchr at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1943 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100722/be82c717/attachment.bin>


More information about the Mercurial-devel mailing list