4 releases

0.0.4 Dec 30, 2019
0.0.3 Nov 3, 2019
0.0.2 Jul 5, 2019
0.0.1 Jun 28, 2019

#14 in #ops

MIT license

8KB
185 lines

PAPRIKA

Build Status

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"

No runtime deps