summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-23 15:45:40 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-23 15:45:40 -0400
commit0a16f8a9389bd626b69ca442f942a8f86b90fa3d (patch)
treea78032abdd4713d5f7284a54ce2d6f0b3d580020 /cmd2.py
parent973f666a7d7e83fc3a0cb6821be0082fe24023cd (diff)
downloadcmd2-git-0a16f8a9389bd626b69ca442f942a8f86b90fa3d.tar.gz
Using shlex.split() again since filenames were being split on periods
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py3
1 files changed, 1 insertions, 2 deletions
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