-
-
Notifications
You must be signed in to change notification settings - Fork 57
Greedy parsers cannot have functioning suggestions #190
Description
There's a hard limitation that a parser can only provide suggestions for one argument being typed. This is because as input to suggestions, only a single String can be provided. When there are two or more parts in the command queue, it is unclear what part should be sent to the suggestions provider.
A greedy string parser might want to suggest words with spaces in them, while a string[] parser might want to suggest a word for every element.
Because suggestions aren't even asked right now (because it is not clear what should happen), there is no workable solution.
CompoundArgument has some special logic tailored to it, but also assumes the last-typed 'element' is what needs suggestions. For greedy parsers that is not valid.
Changing String to Queue<String> for suggestions would make it in parity with parsers, but would also break api compatibility. I know no good solution for this.