ecla

docs

Simple command line arguments parser for Rust.

Document

Usage

Add dependency to Cargo.toml

toml [dependencies] ecla = "1.0.0"

In your main.rs:

```rust extern crate ecla;

use ecla::App;

const HELP: &'static str = "This is help message"; const VERSION: &'static str = "1.0.0";

fn main() { let app = App::new(HELP, VERSION); if let Some(command) = app.getcommand("test") { if let Some(flag) = command.getflag(&["-a", "--all"]) { println!("You have run subcommand test with flag -a or --all"); } else { println!("You have run subcommand test with no flag"); } } else { app.showunknownor_help(); } } ```

Examples

For more usage, see the examples folder

Examples Screenshots

Screenshot

Screenshot

License

ecla is primarily distributed under the terms of the MIT license. See LICENSE for details.