diff --git a/src/arguments.yml b/src/arguments.yml new file mode 100644 index 0000000..6c8eacf --- /dev/null +++ b/src/arguments.yml @@ -0,0 +1,19 @@ +name: Ja +version: "0.1" +about: Like Yes, but better +author: Jarred Allen + +settings: + - ArgRequiredElseHelp + +args: + - DELAY: + help: A delay to wait between each output, in seconds (default none) + short: d + long: delay + multiple: false + takes_value: true + - STRING: + help: Text to repeatedly output + required: true + index: 1 diff --git a/src/main.rs b/src/main.rs index 9f8af1c..ccb6e1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,5 +2,8 @@ extern crate clap; fn main() { - println!("Hello, world!"); + use clap::App; + + let yml = load_yaml!("arguments.yml"); + let m = App::from_yaml(yml).get_matches(); }