Revxrsal / Lamp

A modern annotations-driven commands framework for Java and Kotlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parent commands do not allow non-subcommand overload

opened this issue · comments

i.e. if I have the following commands:

mycom
mycom list
mycom add

The only command that shows up is mycom.
(Each is its own method, and the path is specified in full via @Command)
I am currently working on a plugin that would benefit from this functionality, so it would be best if Lamp supported it.

Can you show a snippet of your code?

It went something like...

@Command("mycom")
public void onMyCom() {}

@Command("mycom list")
public void onList() {}
commented

Your "mycom" is being parsed as an action command, so any parameters will be parsed for it and not other commands.

Solution: add @default to "mycom"