From 0a16f8a9389bd626b69ca442f942a8f86b90fa3d Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Fri, 23 Mar 2018 15:45:40 -0400 Subject: Using shlex.split() again since filenames were being split on periods --- cmd2.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd2.py') diff --git a/cmd2.py b/cmd2.py index ed92a757..a23400d8 100755 --- a/cmd2.py +++ b/cmd2.py @@ -323,9 +323,8 @@ def tokens_for_completion(line, begidx, endidx, preserve_quotes=False): while True: try: - # This type of parsing works better than shlex.split() which doesn't seem to treat > as an individual token. # Use non-POSIX parsing to keep the quotes around the tokens. - tokens = list(shlex.shlex(tmp_line[:tmp_endidx], posix=False)) + tokens = shlex.split(tmp_line[:tmp_endidx], posix=False) break except ValueError: # ValueError can be caused by missing closing quote -- cgit v1.2.1