summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2/history.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd2/history.py b/cmd2/history.py
index 0f47d542..a61ab0d8 100644
--- a/cmd2/history.py
+++ b/cmd2/history.py
@@ -55,6 +55,10 @@ class HistoryItem():
# In non-verbose mode, display raw multiline commands on 1 line
if self.statement.multiline_command:
+ # This is an approximation and not meant to be a perfect piecing together of lines.
+ # All newlines will be converted to spaces, including the ones in quoted strings that
+ # are considered literals. Also if the final line starts with a terminator, then the
+ # terminator will have an extra space before it in the 1 line version.
ret_str = ret_str.replace('\n', ' ')
# Display a numbered list if not writing to a script