Avoid ANSI escape characters in Python output (bug#45938)
authorEvgenii Klimov <eugene.dev@lipklim.org>
Sun, 25 Feb 2024 20:12:38 +0000 (20:12 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 31 Aug 2024 10:12:50 +0000 (13:12 +0300)
* lisp/progmodes/python.el (python-shell-completion-native-setup):
Prevent Readline from emitting escape characters in comint output.

lisp/progmodes/python.el

index 692d915f8f8b6ebe36f9a0edfabdb1990c8ebc61..227be64b5b0f16450268f4714bbedccdab65919b 100644 (file)
@@ -4549,6 +4549,9 @@ def __PYTHON_EL_native_completion_setup():
             readline.parse_and_bind('tab: complete')
             # Require just one tab to send output.
             readline.parse_and_bind('set show-all-if-ambiguous on')
+            # Avoid ANSI escape characters in the output
+            readline.parse_and_bind('set colored-completion-prefix off')
+            readline.parse_and_bind('set colored-stats off')
             # Avoid replacing common prefix with ellipsis.
             readline.parse_and_bind('set completion-prefix-display-length 0')