[PATCH 2 of 8 V2] bash_completion: turn off custom debuggers

Kevin Bullock kbullock+mercurial at ringworld.org
Sun Nov 24 23:43:53 CST 2013


On 22 Nov 2013, at 2:26 PM, Sean Farley <sean.michael.farley at gmail.com> wrote:

> # HG changeset patch
> # User Sean Farley <sean.michael.farley at gmail.com>
> # Date 1385072985 18000
> #      Thu Nov 21 17:29:45 2013 -0500
> # Node ID 4870c6bcf56d3b86fd7456b7075cfd0ba86212b9
> # Parent  4d30dc9b20a68e8b443da7ebbfa79ea2ea2e5825
> bash_completion: turn off custom debuggers
> 
> Previously, a user could have set ui.debugger=ipdb which forces a control
> (non-printable) character to be prepended to all hg output. This would confuse
> compgen enough to not match the first word in a list becuase it thinks
> \033[?1034h is the first part of the string of the first word. Therefore, we
> force ui.debugger to be unset when calling hg in a subprocess.
> 
> diff --git a/contrib/bash_completion b/contrib/bash_completion
> --- a/contrib/bash_completion
> +++ b/contrib/bash_completion
> @@ -54,11 +54,11 @@
> 
> shopt -s extglob
> 
> _hg_cmd()
> {
> -    HGPLAIN=1 "$hg" "$@" 2>/dev/null
> +    HGPLAIN=1 "$hg" --config ui.debugger= "$@" 2>/dev/null

How about making HGPLAIN disable custom debuggers instead?

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list