diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-04 22:11:48 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-04 22:11:48 -0500 |
commit | c628722774b3b302e918ed451815269412519448 (patch) | |
tree | 78ff426464a52badabc6f6f882156c13f5cd53c9 /cmd2/cmd2.py | |
parent | 73496248ba76cc58512142be3973a214ae9336f8 (diff) | |
parent | eb86c739187583a7afdd56e0a9fcf0da212562f1 (diff) | |
download | cmd2-git-c628722774b3b302e918ed451815269412519448.tar.gz |
Merged master into history and resolved conflicts
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 42cb58b4..5912bee3 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -161,7 +161,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] @@ -738,7 +738,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. |