diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-06-14 22:45:55 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-06-14 22:45:55 -0400 |
commit | 544641163b95edf68785320a688d81a034cb56fc (patch) | |
tree | d0447c663e240c34ff7dcc2c5b75ba23f136a7a0 /cmd2/history.py | |
parent | 27d5785651d053b7c4204155897ec03d21f71639 (diff) | |
download | cmd2-git-544641163b95edf68785320a688d81a034cb56fc.tar.gz |
Added comment
Diffstat (limited to 'cmd2/history.py')
-rw-r--r-- | cmd2/history.py | 4 |
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 |