summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-06-13 23:41:04 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2019-06-13 23:41:04 -0400
commit5635962154ac670a73c7c608f56ceb146e975f3f (patch)
tree89d88d0691046b4587f0daa4686bd0370007cb78 /cmd2/cmd2.py
parentf64f9d559caa08b5649b9bd356af2812acf103bd (diff)
downloadcmd2-git-5635962154ac670a73c7c608f56ceb146e975f3f.tar.gz
Fix history display issues
Issues were two fold: - HistoryItem statement.raw was getting mangled for multiline commands due to macro-related changes in _input_line_to_statement() - HistoryItem pretty printing wasn't using rstrip() anymore in verbose mode I added a couple unit tests in the process of getting here. But we should add some explicit unit tests of _input_line_to_statement() for cases like: - basic single-line command - macro single-line command - multiline command
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 387fe6d9..4c1a1bb6 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1934,7 +1934,7 @@ class Cmd(cmd.Cmd):
break
# This will be true when a macro was used
- if orig_line != statement.raw:
+ if not statement.multiline_command and orig_line != statement.raw:
# Build a Statement that contains the resolved macro line
# but the originally typed line for its raw member.
statement = Statement(statement.args,