mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
Fixed console print formatting in commands.py.
This commit is contained in:
parent
7170324214
commit
475bc486d2
1 changed files with 2 additions and 3 deletions
|
@ -10,9 +10,9 @@ class Commands:
|
||||||
cmd_method = getattr(self, cmd_method_name, None)
|
cmd_method = getattr(self, cmd_method_name, None)
|
||||||
if cmd_method:
|
if cmd_method:
|
||||||
description = cmd_method.__doc__
|
description = cmd_method.__doc__
|
||||||
self.console.print(f"{cmd}: {description}")
|
self.console.print(f"{cmd} {description}")
|
||||||
else:
|
else:
|
||||||
self.console.print(f"{cmd}: No description available.")
|
self.console.print(f"{cmd} No description available.")
|
||||||
def cmd_ls(self, args):
|
def cmd_ls(self, args):
|
||||||
"List files and show their chat status"
|
"List files and show their chat status"
|
||||||
print("ls")
|
print("ls")
|
||||||
|
@ -45,7 +45,6 @@ class Commands:
|
||||||
matching_commands = [cmd for cmd in all_commands if cmd.startswith(first_word)]
|
matching_commands = [cmd for cmd in all_commands if cmd.startswith(first_word)]
|
||||||
|
|
||||||
if len(matching_commands) == 1:
|
if len(matching_commands) == 1:
|
||||||
self.console.print("[green]run", matching_commands[0])
|
|
||||||
self.do_run(matching_commands[0][1:], rest_inp)
|
self.do_run(matching_commands[0][1:], rest_inp)
|
||||||
elif len(matching_commands) > 1:
|
elif len(matching_commands) > 1:
|
||||||
self.console.print("[red]Ambiguous command:", ", ".join(matching_commands))
|
self.console.print("[red]Ambiguous command:", ", ".join(matching_commands))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue