summaryrefslogtreecommitdiff
path: root/cmd2/history.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-14 22:45:55 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-14 22:45:55 -0400
commit544641163b95edf68785320a688d81a034cb56fc (patch)
treed0447c663e240c34ff7dcc2c5b75ba23f136a7a0 /cmd2/history.py
parent27d5785651d053b7c4204155897ec03d21f71639 (diff)
downloadcmd2-git-544641163b95edf68785320a688d81a034cb56fc.tar.gz
Added comment
Diffstat (limited to 'cmd2/history.py')
-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