-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Milestone
Description
Ansi codes are displayed in the console instead of the colors when an exception occurs when tab completing. This happens on the prompt-toolkit branch. On the main branch, the exception works as expected.
Easy way to reproduce the error on the prompt-toolkit branch is by modifying argparse_completion.py with the following:
diff --git a/examples/argparse_completion.py b/examples/argparse_completion.py
index 8d2c3dca..46aa5c8d 100755
--- a/examples/argparse_completion.py
+++ b/examples/argparse_completion.py
@@ -48,6 +48,7 @@ class ArgparseCompletion(Cmd):
"These things can\ncontain newlines and\n",
Text("styled text!!", style=Style(color=Color.BRIGHT_YELLOW, underline=True)),
)
+ raise Exception("poc!")
table_item = Table(
"Left Column",After running the output looks like this when attempting to tab complete completion_item:
python argparse_completion.py
?[1;91mException: ?[0mpoc!
?[93mTo enable full traceback, run the following command: ?[0m?[1;36mset debug true?[0m
?[1;91mException: ?[0mpoc!
?[93mTo enable full traceback, run the following command: ?[0m?[1;36mset debug true?[0m
(Cmd) example --completion_item Metadata
Metadata
Assignees
Labels
No labels