2021.4.7 #29

Merged
edraft merged 9 commits from 2021.4.7 into 2021.4.post1 2021-04-13 15:47:25 +02:00
Showing only changes of commit d34d501520 - Show all commits

View File

@ -75,8 +75,24 @@ class CLI(ApplicationABC):
else: else:
for cmd in self._command_handler.commands: for cmd in self._command_handler.commands:
result = self._configuration.get_configuration(cmd.name) result = self._configuration.get_configuration(cmd.name)
result_args = self._configuration.get_configuration(f'{cmd.name}AdditionalArguments') result_args: list[str] = self._configuration.get_configuration(f'{cmd.name}AdditionalArguments')
if result is not None: is_option = False
for opt in self._options:
if opt == result:
is_option = True
command = opt
elif result_args is not None and opt in result_args:
is_option = True
command = opt
result_args.remove(opt)
if is_option:
args.append(cmd.name)
for arg in result_args:
args.append(arg)
elif result is not None:
command = cmd.name command = cmd.name
args.append(result) args.append(result)