Crates.io | xcli |
lib.rs | xcli |
version | 0.5.2 |
source | src |
created_at | 2020-07-09 00:54:51.275026 |
updated_at | 2021-01-25 09:20:12.046404 |
description | xcli, a CLI implementation based on rustyline |
homepage | |
repository | https://github.com/kingwel-xie/xcli-rs |
max_upload_size | |
id | 262726 |
size | 38,769 |
A CLI implementation in Rust that is based on Rustyline.
Supported Platforms
Note:
use xcli::*;
let mut app = App::new("xCLI")
.version("v0.1")
.author("kingwel.xie@139.com");
app.add_subcommand(Command::new("qwert")
.about("controls testing features")
.usage("qwert")
.action(|_app, _actions| -> XcliResult {
println!("qwert tested");
Ok(CmdExeCode::Ok)
}));
app.run();
You can use this package in your project by adding the following
to your Cargo.toml
:
[dependencies]
xcli = "0.5.1"
2020.12.31, v0.5.0 API changes.
2021.1.11, v0.5.1
tree : tree
mode : mode [vi|emacs]
log, l : log [off|error|warn|info|debug|trace]
help, h : help [command]
exit : exit
version, v : version