summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd2.py b/cmd2.py
index b5dbcfbd..bd48c404 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1106,6 +1106,10 @@ class Cmd(cmd.Cmd):
:param end: str - end code to tell GNU Readline about end of invisible characters
:return: str - prompt safe to pass to GNU Readline
"""
+ # Windows terminals don't use ANSI escape codes and Windows readline isn't based on GNU Readline
+ if sys.platform == "win32":
+ return prompt
+
escaped = False
result = ""