summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-04-15 00:59:05 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-04-15 00:59:05 -0400
commit4233570973e12b0a850415e05aee9912cf3e2cd3 (patch)
treeaf3dc02000167a1f462c175bbcc9f92dbe457ff4 /cmd2.py
parent0f1a69f303f1339b7388a3c854b94e562db7529b (diff)
downloadcmd2-git-4233570973e12b0a850415e05aee9912cf3e2cd3.tar.gz
More unit tests and comments
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd2.py b/cmd2.py
index 0ba98106..5bfef5a9 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -2097,6 +2097,9 @@ class Cmd(cmd.Cmd):
if matches_delimited:
display_prefix = os.path.commonprefix(self.display_matches)
+
+ # For delimited matches, we check what appears before the display
+ # matches (common_prefix) as well as the display matches themselves.
if (' ' in common_prefix) or (display_prefix and ' ' in ''.join(self.display_matches)):
add_quote = True