Error handling for CLI commands.
Provides formatted error messages, suggestions, and appropriate exit codes.
Summary
Functions
Prints flag validation errors and exits.
Prints a formatted error message for the CLI.
Shows error for missing required positional arguments.
Shows error when no command is given.
Shows error when a command has no run handler.
Handles unknown command by showing suggestions.
Functions
Prints flag validation errors and exits.
Prints a formatted error message for the CLI.
Shows error for missing required positional arguments.
@spec no_command([map()]) :: {:error, :no_command}
Shows error when no command is given.
@spec no_handler(String.t()) :: {:error, :no_handler}
Shows error when a command has no run handler.
Handles unknown command by showing suggestions.