mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 03:05:00 +00:00
fix /read completions
This commit is contained in:
parent
530dae2a98
commit
a3554ffbbc
3 changed files with 6 additions and 2 deletions
|
@ -151,6 +151,7 @@ class Commands:
|
|||
assert cmd.startswith("/")
|
||||
cmd = cmd[1:]
|
||||
|
||||
cmd = cmd.replace("-", "_")
|
||||
fun = getattr(self, f"completions_{cmd}", None)
|
||||
if not fun:
|
||||
return
|
||||
|
@ -510,7 +511,7 @@ class Commands:
|
|||
fname = f'"{fname}"'
|
||||
return fname
|
||||
|
||||
def completions_read(self):
|
||||
def completions_read_only(self):
|
||||
return self.completions_add()
|
||||
|
||||
def completions_add(self):
|
||||
|
|
|
@ -105,8 +105,10 @@ class AutoCompleter(Completer):
|
|||
cmd = words[0]
|
||||
partial = words[-1].lower()
|
||||
|
||||
if cmd not in self.command_names:
|
||||
matches, _, _ = self.commands.matching_commands(cmd)
|
||||
if len(matches) != 1:
|
||||
return
|
||||
cmd = matches[0]
|
||||
|
||||
if cmd not in self.command_completions:
|
||||
candidates = self.commands.get_completions(cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue