FixedDev / command-flow

A flexible and platform-agnostic command framework for Java 8+
https://unnamed.team/docs/command-flow
MIT License
107 stars 21 forks source link

Add tab-completion for Flags and Switches #15

Open MCMDEV opened 3 years ago

MCMDEV commented 3 years ago

Tab-Completion for Flags and Switches are a useful feature for advanced commands, but are still left out quite often because of implementation difficulties.

Suggestions should switch to flags/switches as soon as the user types the '-' symbol. All the available flag/switch names should be listed then. When a flag is chosen, the completion should switch be handled by the Part again. If it's a switch, it should just switch back to normal completion.

FixedDev commented 3 years ago

Ok, that's actually a good idea, but to do that possible we need to implement the flags/switches with some sort of special treatment on the SequentialCommandPart (or other "collector" parts like that).