Skip to content

Commit b994df2

Browse files
committed
Merge branch 'master' into macro_refactor
2 parents aa823bd + 91e2710 commit b994df2

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 0.9.13 (TBD, 2019)
22
* Bug Fixes
3+
* Fixed issue where the wrong terminator was being appended by `Statement.expanded_command_line()`
34
* Fixed issue where aliases and macros could not contain terminator characters in their values
45
* History now shows what was typed for macros and not the resolved value by default. This is consistent with
56
the behavior of aliases. Use the `expanded` or `verbose` arguments to `history` to see the resolved value for

cmd2/parsing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,7 @@ def command_and_args(self) -> str:
201201
def post_command(self) -> str:
202202
"""A string containing any ending terminator, suffix, and redirection chars"""
203203
rtn = ''
204-
if self.multiline_command:
205-
rtn += constants.MULTILINE_TERMINATOR
206-
elif self.terminator:
204+
if self.terminator:
207205
rtn += self.terminator
208206

209207
if self.suffix:

tests/test_parsing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ def test_parse_alias_on_multiline_command(parser):
492492
assert statement.args == statement
493493
assert statement == 'has > inside an unfinished command'
494494
assert statement.terminator == ''
495-
assert statement.expanded_command_line == statement.multiline_command + ' ' + statement + MULTILINE_TERMINATOR
496495

497496
@pytest.mark.parametrize('line,output', [
498497
('helpalias > out.txt', '>'),

0 commit comments

Comments
 (0)