mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Extract command name from matching_commands[0][1:]
This commit is contained in:
parent
01a9a8ffc4
commit
860a36fe6c
1 changed files with 3 additions and 2 deletions
|
@ -202,8 +202,9 @@ class Commands:
|
|||
return
|
||||
matching_commands, first_word, rest_inp = res
|
||||
if len(matching_commands) == 1:
|
||||
self.coder.event(f"command_{matching_commands[0][1:]}")
|
||||
return self.do_run(matching_commands[0][1:], rest_inp)
|
||||
command = matching_commands[0][1:]
|
||||
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[1:]}")
|
||||
return self.do_run(first_word[1:], rest_inp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue