-
Notifications
You must be signed in to change notification settings - Fork 441
Closed
Labels
Milestone
Description
Similar in spirit to ${DEFAULT-VALUE}
and ${COMPLETION-CANDIDATES}
, it would be very useful to allow a set of variables to be registered that could then be used in message strings.
For example, currently I need to do this on my command methods in a hierarchy:
@Override
@Command(description = "Tails the " + App.SERVICE + " docker logs")
public Status logs() {
return super.logs();
}
what would be nicer is:
@Command(description = "Tails the ${PARENT-COMMAND-NAME} docker logs")
public Status logs() {
// ...
}
This would allow inheritance chains to allow for encapsulating command methods in the base class and thus the need to override just to change the variable value statically.
It would be nice to have some predefined variables for common things like parent command name and current command name, as well as the ability to generalize to support this use case and others.