mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
handle files with spaces
This commit is contained in:
parent
4b0192ffd9
commit
3c1a6acc0d
2 changed files with 3 additions and 1 deletions
|
@ -381,6 +381,7 @@ class Commands:
|
|||
def completions_add(self):
|
||||
files = set(self.coder.get_all_relative_files())
|
||||
files = files - set(self.coder.get_inchat_relative_files())
|
||||
files = [self.quote_fname(fn) for fn in files]
|
||||
return files
|
||||
|
||||
def glob_filtered_to_repo(self, pattern):
|
||||
|
@ -484,6 +485,7 @@ class Commands:
|
|||
|
||||
def completions_drop(self):
|
||||
files = self.coder.get_inchat_relative_files()
|
||||
files = [self.quote_fname(fn) for fn in files]
|
||||
return files
|
||||
|
||||
def cmd_drop(self, args=""):
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue