diff --git a/bin/src/main.rs b/bin/src/main.rs index fb6dba6a..03cedd72 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -125,10 +125,23 @@ fn main() { .takes_value(false) .required(false) .multiple(false) - .help("Get the versions of the imag commands")); + .help("Get the versions of the imag commands")) + .arg(Arg::with_name("help") + .long("help") + .short("h") + .takes_value(false) + .required(false) + .multiple(false) + .help("Show help")); + let matches = app.get_matches(); + if matches.is_present("help") { + help(get_commands()); + exit(0); + } + if matches.is_present("version") { println!("imag {}", &version!()[..]); exit(0);