Bugfixes for help command handling

This commit is contained in:
Sven Heidemann 2021-04-13 15:27:19 +02:00
parent d34d501520
commit 602c48bc06
2 changed files with 5 additions and 3 deletions

View File

@ -89,6 +89,7 @@ class CLI(ApplicationABC):
if is_option:
args.append(cmd.name)
if result_args is not None:
for arg in result_args:
args.append(arg)

View File

@ -39,11 +39,12 @@ class HelpService(CommandABC):
command_name = args[0]
command: Optional[CommandABC] = None
for cmd in self._commands:
if cmd.name == command_name:
if cmd.name == command_name or command_name in cmd.aliases:
command = self._services.get_service(cmd.command)
if command is None:
Console.error(f'Invalid argument: {command_name}')
return
Console.write_line(command.help_message)