summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--cmd2/cmd2.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47e48406..abb440dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
* Bug Fixes
* Fixed exception caused by tab completing after an invalid subcommand was entered
* Fixed bug where `history -v` was sometimes showing raw and expanded commands when they weren't different
+ * Fixed bug where multiline commands were having leading and ending spaces stripped. This would mess up quoted
+ strings that crossed multiple lines.
* Enhancements
* Greatly simplified using argparse-based tab completion. The new interface is a complete overhaul that breaks
the previous way of specifying completion and choices functions. See header of [argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/master/cmd2/argparse_custom.py)
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 9e5f5d56..c8f2f9ff 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -2204,7 +2204,7 @@ class Cmd(cmd.Cmd):
else:
line = 'eof'
- return line.strip()
+ return line.rstrip('\r\n')
def _cmdloop(self) -> None:
"""Repeatedly issue a prompt, accept input, parse an initial prefix