improve cli help text

and add a `-w` as short for `--chdir`
This commit is contained in:
Дамјан Георгиевски 2019-09-21 15:54:57 +02:00
parent 9c6ff4eddf
commit c68cf3a3e8
2 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "http-server"
version = "0.10.1"
version = "0.10.2"
authors = ["Damjan Georgievski <gdamjan@gmail.com>"]
license = "MIT"
readme = "README.md"

View file

@ -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")