ace 0.0.1

Parsing command line arguments
Documentation

Ace

Build Status Crates.io LICENSE

A simple command line parameter parsing library

Install

Add this in your Cargo.toml:

[dependencies]
ace = "0.0.1"

Example

use ace::Ace;

let app = Ace::new()
    .arg("start", "Start daemon")
    .arg("help", "Display help information")
    .arg("version", "Display version information");

if let Some(cmd) = app.command() {
    match cmd.as_str() {
        "start" => {
            dbg!(app.value());
        }
        "help" => {
            app.help();
        }
        "version" => {
            app.version();
        }
        _ => {
            app.error();
        }
    }
} else {
    app.error_try("help");
}