You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you create your own ArgumentParser that returns 0 in getRequestedArgumentCount(), with the intention of it inspecting the command context to deduce the argument value from there, it doesnt work. I used one with my own flag, --nearest. But when I tried to run the command with --nearest, it gives an error that it expects an argument. Despite argument count being 0.
Another issue is that you can't have a variable number of argument values for a flag, but that's a different issue altogether and less important here.
If there is an alternative way to register a new flag with some sort of 'value supplier' or function CommandContext -> Value, that would be fine too. There's no suggestions and the queue isn't used, anyway, so using an ArgumentParser for this is a bit out of place as well.
When you create your own ArgumentParser that returns 0 in getRequestedArgumentCount(), with the intention of it inspecting the command context to deduce the argument value from there, it doesnt work. I used one with my own flag, --nearest. But when I tried to run the command with --nearest, it gives an error that it expects an argument. Despite argument count being 0.
Another issue is that you can't have a variable number of argument values for a flag, but that's a different issue altogether and less important here.
If there is an alternative way to register a new flag with some sort of 'value supplier' or function CommandContext -> Value, that would be fine too. There's no suggestions and the queue isn't used, anyway, so using an ArgumentParser for this is a bit out of place as well.
Example code:
The text was updated successfully, but these errors were encountered: