new CommandRegistry()
A registry that contains the commands known by a shell.
It is a mutable command resolver.
Methods
-
registerCommand(command, completionHandler) → {CommandRegistry}
-
Register a command
Parameters:
Name Type Description commandCommand the command to register completionHandlerfunction notified when the command is registered Returns:
a reference to this, so the API can be used fluently- Type
- CommandRegistry
-
registerCommands(commands, completionHandler) → {CommandRegistry}
-
Register a list of commands.
Parameters:
Name Type Description commandsArray.<Command> the commands to register completionHandlerfunction notified when the command is registered Returns:
a reference to this, so the API can be used fluently- Type
- CommandRegistry
-
unregisterCommand(commandName, completionHandler) → {CommandRegistry}
-
Unregister a command.
Parameters:
Name Type Description commandNamestring the command name completionHandlerfunction notified when the command is unregistered Returns:
a reference to this, so the API can be used fluently- Type
- CommandRegistry