Trait terminal_cli::CliCommand [−] [src]

pub trait CliCommand {
    fn execute(&mut self, cli: &mut CliTerminal, line: &str);
    fn is_match(&self, line: &str) -> bool;
    fn autocomplete(&self, line_start: &str) -> Option<Vec<AutocompleteOption>>;
}

A command that can be executed by the execution function.

Required Methods

fn execute(&mut self, cli: &mut CliTerminal, line: &str)

Execute the command with the given line buffer

fn is_match(&self, line: &str) -> bool

Check if the line buffer is valid for this command

fn autocomplete(&self, line_start: &str) -> Option<Vec<AutocompleteOption>>

Give auto-complete hints

Implementors