summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index bffb6d54..9ae18a8c 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1423,7 +1423,7 @@ class Cmd(cmd.Cmd):
if line.startswith(shortcut):
# If the next character after the shortcut isn't a space, then insert one
shortcut_len = len(shortcut)
- if len(line) == shortcut_len or line[shortcut_len] != ' ':
+ if len(line) > shortcut_len and line[shortcut_len] != ' ':
expansion += ' '
# Expand the shortcut