Struct boxxy::shell::Shell
[−]
[src]
pub struct Shell { /* fields omitted */ }
The struct that keeps track of the user interface.
Methods
impl Shell
[src]
fn new(toolbox: Toolbox) -> Shell
[src]
Initializes a shell. Takes a Toolbox
that contains the available
commands. The toolbox is also used to configure tab completion.
use boxxy::{Shell, Toolbox}; let toolbox = Toolbox::new(); let shell = Shell::new(toolbox);
fn insert<I: Into<String>>(&mut self, name: I, command: Command)
[src]
fn exec_once(&self, line: &str)
[src]
fn run(&mut self)
[src]
Run the input loop. This doesn't return until the shell is exited.
use boxxy::{Shell, Toolbox}; let toolbox = Toolbox::new(); let mut shell = Shell::new(toolbox); // run the loop shell.run();