-
Notifications
You must be signed in to change notification settings - Fork 445
Closed
Labels
Milestone
Description
Hi, is there currently a way to filter subcommands at runtime if they are declared with annotations ?
@Command(name="xx", subcommands={YY.class, CC.class, AA.class})
class XX implements Callable<Integer>
{
// this is API example of my implementation, though I don't really like it, it's not strongly typed, but it should be something in this form.
public static Boolean picocliFilterSubcommand(Class subcommand)
{
if(Boolean.valueOf(System.getProperty("DISABLE_CC_SUBCOMMAND"))
return subcommand == CC.class;
}
@Override
public Integer call() throws Exception
{
}
}Here is that PR in my fork implementing this, but I think there should be a way to more properly implement this