Function cline::cline_run [] [src]

pub fn cline_run(cli: &mut Cli)

Helper function that emulates linux terminal behaviour for command completion based on the commands registered with the Cli struct passed to the function. Can be exited with Ctrl + c

cli.register(vec!["foo", "bar"], | _ | { println!("running foo bar") });
cli.register(vec!["foo", "baz"], | _ | { println!("running foo baz") });

cline_run(&mut cli);

Note

Current implementation only works on linux (termios based)