mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Fix epage's nits
* Use real newlines in command descriptions * Make `--dest-dir` optional * Show help message when no subcommand is supplied
This commit is contained in:
parent
271bad9b08
commit
921aa50d18
@ -12,15 +12,17 @@ fn main() {
|
||||
let crate_version = format!("v{}", crate_version!());
|
||||
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn")).init();
|
||||
let d_arg = arg!(-d --"dest-dir" <DEST_DIR>
|
||||
"The output directory for your book{n}(Defaults to ./book when omitted)");
|
||||
"The output directory for your book\n(Defaults to ./book when omitted)")
|
||||
.required(false);
|
||||
let dir_arg = arg!([dir]
|
||||
"A directory for your book{n}(Defaults to Current Directory when omitted)");
|
||||
"A directory for your book\n(Defaults to Current Directory when omitted)");
|
||||
|
||||
let matches = Command::new("rustbook")
|
||||
.about("Build a book with mdBook")
|
||||
.author("Steve Klabnik <steve@steveklabnik.com>")
|
||||
.version(&*crate_version)
|
||||
.subcommand_required(true)
|
||||
.arg_required_else_help(true)
|
||||
.subcommand(
|
||||
Command::new("build")
|
||||
.about("Build the book from the markdown files")
|
||||
|
Loading…
Reference in New Issue
Block a user