summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
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