fix: Correct command execution logic

This commit is contained in:
Paul Gauthier 2024-08-12 18:23:51 -07:00 committed by Paul Gauthier (aider)
parent 9ed732959e
commit 85fa78f5a6

View file

@ -206,8 +206,9 @@ class Commands:
self.coder.event(f"command_{command}")
return self.do_run(command, rest_inp)
elif first_word in matching_commands:
self.coder.event(f"command_{first_word}")
return self.do_run(first_word[1:], rest_inp)
command = first_word[1:]
self.coder.event(f"command_{command}")
return self.do_run(command, rest_inp)
elif len(matching_commands) > 1:
self.io.tool_error(f"Ambiguous command: {', '.join(matching_commands)}")
else: