Raxol.Demo.CommandWhitelist (Raxol v2.6.0)

View Source

Command registry for demo terminal. Only whitelisted commands are executed. Validates input and blocks anything not explicitly registered.

Summary

Functions

Returns list of available commands for help display.

Executes a command if it's whitelisted. Returns error for unknown commands.

Types

command_result()

@type command_result() ::
  {:ok, String.t()}
  | {:error, String.t()}
  | {:animate, (term() -> term())}
  | {:exit, String.t()}

Functions

available_commands()

@spec available_commands() :: [{String.t(), String.t()}]

Returns list of available commands for help display.

execute(input)

@spec execute(String.t()) :: command_result()

Executes a command if it's whitelisted. Returns error for unknown commands.