The Command Context
The command context can be executed only in the definition of our commands, the function command receives as parameter the name of the command followed by the function o containing the context.
#
CommandContext members#
aliasesThis member allows you to define some aliases for the command that owns the context.
Example usage:
Now we can run
Types:
#
descriptionThis member assigns a description to the command that owns the context.
Example usage:
Types:
#
argThis member define arguments for the command that owns the context.
Example usage:
Now we can run
Types:
#
optionThis member allows definit options / flags to the command owner of the context.
Example usage:
Now we can run
Types:
#
usageThis member allows you to define a usage manually for the command that owns the context.
Example usage:
Types:
#
onActionThis member allows defining a function to be executed when the command is invoked by the command line, note that this callback receives the context Action Context.
Example usage:
Types:
#
getNameThis function returns the name of the command ateo (for documentation purposes and consumption of the internal api).