summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd2.py b/cmd2.py
index 384ab064..68ede281 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -2341,8 +2341,10 @@ class Cmd2TestCase(unittest.TestCase):
# turn through the loop
start = second_slash_pos + 1
else:
- # no closing slash, treat it all as plain text
- regex += re.escape(s[start:])
+ # No closing slash, we have to add the first slash,
+ # and the rest of the text
+ regex += re.escape(s[start-1:])
+ break
return regex
def _escaped_find(self, regex, s, start, in_regex):