Crates.io | paprika |
lib.rs | paprika |
version | 0.0.4 |
source | src |
created_at | 2019-06-28 16:56:35.700434 |
updated_at | 2019-12-30 15:46:17.454448 |
description | Paprika is a command line parser |
homepage | |
repository | https://github.com/tak0-auk/paprika |
max_upload_size | |
id | 144339 |
size | 9,281 |
PAPRIKA is Command Line Parser like a toy.
PAPRIKA is a product for learning Rust and version control.
If you need a good command line parser,
You should use Clap instead of PAPRIKA.
[dependencies]
paprika = "*"
extern crate paprika;
use paprika::{App, Ops};
use std::process;
fn main() {
let mut app = App::new();
let ver = Ops::new()
.short("v")
.long("version")
.description("version");
app.add_ops(ver);
app.parse();
if app.has_ops("version") {
println!("version {}", env!("CARGO_PKG_VERSION"));
process::exit(0);
}
}
cargo run --example example -- -v
cargo run --example get_value -- --name="YOUR NAME"