~ajhalili2006/enterprisey-syncwiki-patches

3cf09861941ee66ea1d2365305a4db5f996b7431 — Enterprisey 3 years ago 1ed6509
Improve help messages a litte
1 files changed, 7 insertions(+), 3 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +7 -3
@@ 43,7 43,7 @@ fn main() {
                .arg("srcdst")
                .arg("read_stdin")
                .required(true))
            .after_help("Note that srcdst in the Usage line means <SOURCE> <DESTINATION>. This is a bug in the argument parsing library, sorry."))
            .after_help("Note that srcdst in the Usage line means <SOURCE> <DESTINATION>. This is a bug in the argument parsing library, sorry. Also, you can abbreviate 'upload' (in `syncwiki upload`) as 'up'."))

        .subcommand(SubCommand::with_name("download")
            .alias("down")


@@ 63,7 63,8 @@ fn main() {
            .group(ArgGroup::with_name("destination_choices")
                .arg("destination")
                .arg("write_stdout")
                .required(true)))
                .required(true))
            .after_help("You can abbreviate 'download' (in `syncwiki download`) as 'down' or 'dn'."))
        .get_matches();

    match matches.subcommand() {


@@ 115,7 116,10 @@ fn main() {
                sub_matches.value_of("destination").map(|dst| Path::new(dst)),
            );
        },
        _ => unreachable!(),
        _ => {
            println!("USAGE: {0} download [options] OR {0} upload [options]", std::env::args().next().unwrap_or("syncwiki".into()));
            std::process::exit(1);
        },
    }
}