diff --git a/python_files/pythonrc.py b/python_files/pythonrc.py index 005b06bcdd15..63c52bc009da 100644 --- a/python_files/pythonrc.py +++ b/python_files/pythonrc.py @@ -52,7 +52,9 @@ def __str__(self): result = "" # For non-windows allow recent_command history. if sys.platform != "win32": - result = "{command_executed}{command_line}{command_finished}{prompt_started}{prompt}{command_start}".format( + result = "{soh}{command_executed}{command_line}{command_finished}{prompt_started}{stx}{prompt}{soh}{command_start}{stx}".format( + soh="\001", + stx="\002", command_executed="\x1b]633;C\x07", command_line="\x1b]633;E;" + str(get_last_command()) + "\x07", command_finished="\x1b]633;D;" + str(exit_code) + "\x07",