diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-23 15:45:40 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-23 15:45:40 -0400 |
commit | 0a16f8a9389bd626b69ca442f942a8f86b90fa3d (patch) | |
tree | a78032abdd4713d5f7284a54ce2d6f0b3d580020 /cmd2.py | |
parent | 973f666a7d7e83fc3a0cb6821be0082fe24023cd (diff) | |
download | cmd2-git-0a16f8a9389bd626b69ca442f942a8f86b90fa3d.tar.gz |
Using shlex.split() again since filenames were being split on periods
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |