[PATCH 7 of 7] bash_completion: turn off custom debuggers

Sean Farley sean.michael.farley at gmail.com
Thu Nov 21 16:56:11 CST 2013


# 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 fed68b2f62de80b7e06b6e062d909c726bea7970
# Parent  228017c0ab35563e78a3d1e347e6ed2f409c7e78
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
 }
 
 _hg_commands()
 {
     local commands


More information about the Mercurial-devel mailing list