diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-04 22:16:10 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-04 22:16:10 -0500 |
commit | b4e7cc7cb2de1bd78d65a250caab91dc6cd90221 (patch) | |
tree | e7c62918c696a105b6ab8ce6b7c3322006d1c566 /cmd2/cmd2.py | |
parent | 123ac08169078cd8d232ae39102534782ac7fd87 (diff) | |
parent | eb86c739187583a7afdd56e0a9fcf0da212562f1 (diff) | |
download | cmd2-git-b4e7cc7cb2de1bd78d65a250caab91dc6cd90221.tar.gz |
Merge master into with_argument_list and resolved conflicts
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 1167e529..1bfeba1d 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] @@ -766,7 +766,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. @@ -2288,7 +2288,7 @@ class Cmd(cmd.Cmd): " would for the actual command the alias resolves to.\n" "\n" "Examples:\n" - " alias ls !ls -lF\n" + " alias create ls !ls -lF\n" " alias create show_log !cat \"log file.txt\"\n" " alias create save_results print_results \">\" out.txt\n") |