Fixed command handling

This commit is contained in:
Sven Heidemann 2021-10-26 23:23:56 +02:00
parent 0f43e57831
commit 707df3f27d

View File

@ -199,7 +199,8 @@ class Configuration(ConfigurationABC):
if alias == argument or f' {alias} ' == argument:
found = True
if argument_type.name != argument and not found:
if (argument_type.token != '' and f'{argument_type.token}{argument_type.name}' != argument
or argument_type.name not in argument) and not found:
return False
if (next_arguments is None or len(next_arguments) == 0) and \
@ -210,7 +211,7 @@ class Configuration(ConfigurationABC):
value = ''
else:
value = next_arguments[0]
next_arguments.remove(value)
# next_arguments.remove(value)
self._handled_args.append(value)
if argument_type.token != '' and argument.startswith(argument_type.token):