]> git.eshelyaron.com Git - emacs.git/commitdiff
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)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Sep 2024 07:51:53 +0000 (09:51 +0200)
* lisp/progmodes/python.el (python-shell-completion-native-setup):
Prevent Readline from emitting escape characters in comint output.

(cherry picked from commit e27849ecf6ee01f6d02ef2785d0c10e32bc764e9)

lisp/progmodes/python.el

index dba2c4bf2fffebb7fe155a832e41c5defd9bcd0c..6914a663af0bff2beb5bacba17afe466f2892ec2 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')