diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-05-11 21:48:24 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-05-11 21:48:24 -0400 |
commit | 3a2af4d81effe0c8701146c98d12b08dc0622214 (patch) | |
tree | fa9e6f0e7f4d107a5fab825e1bcc2d6b92456f1b /cmd2.py | |
parent | 2bd17dbc34ce88a4cd5375dadb0406b891a1fdb6 (diff) | |
download | cmd2-git-3a2af4d81effe0c8701146c98d12b08dc0622214.tar.gz |
Windows terminal doesn't use ANSI escape codes
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 = "" |