summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-03-01 18:34:39 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-03-01 18:34:39 -0500
commitde5213605d04ded441783ad77e87e91539ceee68 (patch)
treecf340688db1d8df5c0a9602fc872a3af721196bd /cmd2/cmd2.py
parentde701086ff832bad0f0d97ffb10c2159d56ede7d (diff)
downloadcmd2-git-de5213605d04ded441783ad77e87e91539ceee68.tar.gz
Removed support for c-style and embedded comments
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 24e140fd..08906055 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -160,7 +160,7 @@ def parse_quoted_string(string: str, preserve_quotes: bool) -> List[str]:
lexed_arglist = string
else:
# Use shlex to split the command line into a list of arguments based on shell rules
- lexed_arglist = shlex.split(string, posix=False)
+ lexed_arglist = shlex.split(string, comments=False, posix=False)
if not preserve_quotes:
lexed_arglist = [utils.strip_quotes(arg) for arg in lexed_arglist]
@@ -761,7 +761,7 @@ class Cmd(cmd.Cmd):
while True:
try:
# Use non-POSIX parsing to keep the quotes around the tokens
- initial_tokens = shlex.split(tmp_line[:tmp_endidx], posix=False)
+ initial_tokens = shlex.split(tmp_line[:tmp_endidx], comments=False, posix=False)
# If the cursor is at an empty token outside of a quoted string,
# then that is the token being completed. Add it to the list.