We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3b9a35 commit ebe8873Copy full SHA for ebe8873
cmd2/cmd2.py
@@ -1141,7 +1141,11 @@ def complete_users() -> List[str]:
1141
1142
# Remove cwd if it was added to match the text readline expects
1143
if cwd_added:
1144
- matches = [cur_path.replace(cwd + os.path.sep, '', 1) for cur_path in matches]
+ if cwd == os.path.sep:
1145
+ to_replace = cwd
1146
+ else:
1147
+ to_replace = cwd + os.path.sep
1148
+ matches = [cur_path.replace(to_replace, '', 1) for cur_path in matches]
1149
1150
# Restore the tilde string if we expanded one to match the text readline expects
1151
if expanded_tilde_path:
0 commit comments