Raxol.Terminal.Commands.Registry (Raxol v0.5.0)
View SourceManages terminal commands with advanced features:
- Command registration and lookup
- Command validation and execution
- Command history tracking
- Command completion suggestions
Summary
Functions
Clears the command history.
Executes a command with the given arguments.
Gets command completion suggestions for the given input.
Gets the command history.
Gets the current registry metrics.
Creates a new command registry with the given options.
Registers a new command in the registry.
Types
@type command() :: %{ name: command_name(), description: command_description(), handler: command_handler(), aliases: command_aliases(), usage: command_usage(), completion: command_completion() }
@type command_aliases() :: [String.t()]
@type command_completion() :: function() | nil
@type command_description() :: String.t()
@type command_handler() :: function()
@type command_name() :: String.t()
@type command_usage() :: String.t()
@type t() :: %Raxol.Terminal.Commands.Registry{ commands: %{required(String.t()) => command()}, history: [String.t()], max_history: integer(), metrics: command_metrics() }
Functions
Clears the command history.
Executes a command with the given arguments.
Gets command completion suggestions for the given input.
Gets the command history.
Gets the current registry metrics.
Creates a new command registry with the given options.
Registers a new command in the registry.