The cline
crate provides an API that allows users to register CLI commands with an execute and dynamic suggest callback to help implementing command line clients that support auto completion of commands
extern crate cline;
use cline::{Cli, cline_run};
fn main() {
let mut cli = Cli::new();
cli.register(vec!["foo", "bar"], | _ | { println!("running foo bar") });
cli.register(vec!["foo", "baz"], | _ | { println!("running foo baz") });
cline_run(&mut cli);
}
Copyright © 2015 Christoph Sitter
Distributed under the Apache License Version 2.0.