summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-05-23 10:39:44 -0700
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-05-23 10:39:44 -0700
commit652b762f0d5b4f68499adbf6b1470f5fd07a5a77 (patch)
treeb2d55536a30886f222fc4ae063b885e5a0a4bbb2 /cmd2.py
parent67e6373838c06d74ec596ed7f880214c2b34c5e6 (diff)
downloadcmd2-git-652b762f0d5b4f68499adbf6b1470f5fd07a5a77.tar.gz
Fix corner case in command completion of shell commands
Fixed the path part of command completion of shell commands when that path happens to being with "~" (i.e. relies on user path expansion).
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 9f2f6645..412204f1 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1528,7 +1528,7 @@ class Cmd(cmd.Cmd):
if len(possible_path) == 0 and not text:
return []
- if os.path.sep not in possible_path:
+ if os.path.sep not in possible_path and possible_path != '~':
# The text before the search text is not a directory path.
# It is OK to try shell command completion.
command_completions = self._shell_command_complete(text)