handle files with spaces

This commit is contained in:
Paul Gauthier 2024-07-03 20:12:04 -03:00
parent 4b0192ffd9
commit 3c1a6acc0d
2 changed files with 3 additions and 1 deletions

View file

@ -72,7 +72,7 @@ class AutoCompleter(Completer):
for cmd in candidates:
if cmd.startswith(partial):
yield Completion(cmd, start_position=-len(partial))
elif len(words) > 1:
elif len(words) > 1 and not text[-1].isspace():
cmd = words[0]
partial = words[-1]