From c68cf3a3e8fdf832f1d4cec35be45ca95978149b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Sat, 21 Sep 2019 15:54:57 +0200 Subject: [PATCH] improve cli help text and add a `-w` as short for `--chdir` --- Cargo.toml | 2 +- src/main.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2826ef9..971af14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "http-server" -version = "0.10.1" +version = "0.10.2" authors = ["Damjan Georgievski "] license = "MIT" readme = "README.md" diff --git a/src/main.rs b/src/main.rs index ac6fd5a..85a3430 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,15 +7,17 @@ fn main() -> std::io::Result<()> { .version(clap::crate_version!()) .about(clap::crate_description!()) .arg(clap::Arg::with_name("chdir") + .short("w") .long("chdir") .value_name("DIRECTORY") - .help("Specify directory to server") + .help("directory to serve") .default_value(".") .takes_value(true)) .arg(clap::Arg::with_name("addr") + .short("b") .long("bind") .value_name("ADDRESS") - .help("Specify alternate bind address") + .help("bind address") .default_value("0.0.0.0") .takes_value(true)) .arg(clap::Arg::with_name("port")