diff --git a/aider/io.py b/aider/io.py index 093b6403e..37b1e13fe 100644 --- a/aider/io.py +++ b/aider/io.py @@ -106,9 +106,10 @@ class AutoCompleter(Completer): partial = words[-1].lower() matches, _, _ = self.commands.matching_commands(cmd) - if len(matches) != 1: + if len(matches) == 1: + cmd = matches[0] + elif cmd not in matches: return - cmd = matches[0] if cmd not in self.command_completions: candidates = self.commands.get_completions(cmd)