Skip to content

Conversation

@leonardofoderaro
Copy link

Hi,
thank you for this great library.
I'd need the current Command name in the public Command build method.
Since a Command can be invoked by multiple names it could be useful to save the current name used to invoke it in order to make it available to the CommandBuilder, possibly without modify the Command Interface (as it would impact all the existing commands).
Is there a better way to get this information instead of my suggested patch?
Thank you,
Leonardo

@whoschek
Copy link

The AbstractCommand ctor already has a CommandBuilder param and CommandBuilder.names() would give you the names used for this command (although not the actually used name in case there are multiple aliases). Would that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants