2021.4.7 #29
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user