Use imperative mood in help strings (#256)

This commit is contained in:
Casey Rodarmor 2017-11-17 23:59:36 -08:00 committed by GitHub
parent c84a86dd2b
commit 87b2130db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,8 @@ pub fn run() {
.version(concat!("v", env!("CARGO_PKG_VERSION"))) .version(concat!("v", env!("CARGO_PKG_VERSION")))
.author(env!("CARGO_PKG_AUTHORS")) .author(env!("CARGO_PKG_AUTHORS"))
.about(concat!(env!("CARGO_PKG_DESCRIPTION"), " - ", env!("CARGO_PKG_HOMEPAGE"))) .about(concat!(env!("CARGO_PKG_DESCRIPTION"), " - ", env!("CARGO_PKG_HOMEPAGE")))
.help_message("Print help information")
.version_message("Print version information")
.setting(AppSettings::ColoredHelp) .setting(AppSettings::ColoredHelp)
.setting(AppSettings::TrailingVarArg) .setting(AppSettings::TrailingVarArg)
.arg(Arg::with_name("ARGUMENTS") .arg(Arg::with_name("ARGUMENTS")
@ -55,21 +57,21 @@ pub fn run() {
.takes_value(true) .takes_value(true)
.possible_values(&["auto", "always", "never"]) .possible_values(&["auto", "always", "never"])
.default_value("auto") .default_value("auto")
.help("Prints colorful output")) .help("Print colorful output"))
.arg(Arg::with_name("DRY-RUN") .arg(Arg::with_name("DRY-RUN")
.long("dry-run") .long("dry-run")
.help("Prints what just would do without doing it") .help("Print what just would do without doing it")
.conflicts_with("QUIET")) .conflicts_with("QUIET"))
.arg(Arg::with_name("DUMP") .arg(Arg::with_name("DUMP")
.long("dump") .long("dump")
.help("Prints entire justfile")) .help("Print entire justfile"))
.arg(Arg::with_name("EDIT") .arg(Arg::with_name("EDIT")
.short("e") .short("e")
.long("edit") .long("edit")
.help("Opens justfile with $EDITOR")) .help("Open justfile with $EDITOR"))
.arg(Arg::with_name("EVALUATE") .arg(Arg::with_name("EVALUATE")
.long("evaluate") .long("evaluate")
.help("Prints evaluated variables")) .help("Print evaluated variables"))
.arg(Arg::with_name("HIGHLIGHT") .arg(Arg::with_name("HIGHLIGHT")
.long("highlight") .long("highlight")
.help("Highlight echoed recipe lines in bold")) .help("Highlight echoed recipe lines in bold"))
@ -77,16 +79,16 @@ pub fn run() {
.short("f") .short("f")
.long("justfile") .long("justfile")
.takes_value(true) .takes_value(true)
.help("Uses <JUSTFILE> as justfile. --working-directory must also be set") .help("Use <JUSTFILE> as justfile. --working-directory must also be set")
.requires("WORKING-DIRECTORY")) .requires("WORKING-DIRECTORY"))
.arg(Arg::with_name("LIST") .arg(Arg::with_name("LIST")
.short("l") .short("l")
.long("list") .long("list")
.help("Lists available recipes and their arguments")) .help("List available recipes and their arguments"))
.arg(Arg::with_name("QUIET") .arg(Arg::with_name("QUIET")
.short("q") .short("q")
.long("quiet") .long("quiet")
.help("Suppresses all output") .help("Suppress all output")
.conflicts_with("DRY-RUN")) .conflicts_with("DRY-RUN"))
.arg(Arg::with_name("SET") .arg(Arg::with_name("SET")
.long("set") .long("set")
@ -94,7 +96,7 @@ pub fn run() {
.number_of_values(2) .number_of_values(2)
.value_names(&["VARIABLE", "VALUE"]) .value_names(&["VARIABLE", "VALUE"])
.multiple(true) .multiple(true)
.help("Sets <VARIABLE> to <VALUE>")) .help("Set <VARIABLE> to <VALUE>"))
.arg(Arg::with_name("SHELL") .arg(Arg::with_name("SHELL")
.long("shell") .long("shell")
.takes_value(true) .takes_value(true)
@ -105,10 +107,10 @@ pub fn run() {
.long("show") .long("show")
.takes_value(true) .takes_value(true)
.value_name("RECIPE") .value_name("RECIPE")
.help("Shows information about <RECIPE>")) .help("Show information about <RECIPE>"))
.arg(Arg::with_name("SUMMARY") .arg(Arg::with_name("SUMMARY")
.long("summary") .long("summary")
.help("Lists names of available recipes")) .help("List names of available recipes"))
.arg(Arg::with_name("VERBOSE") .arg(Arg::with_name("VERBOSE")
.short("v") .short("v")
.long("verbose") .long("verbose")
@ -117,7 +119,7 @@ pub fn run() {
.short("d") .short("d")
.long("working-directory") .long("working-directory")
.takes_value(true) .takes_value(true)
.help("Uses <WORKING-DIRECTORY> as working directory. --justfile must also be set") .help("Use <WORKING-DIRECTORY> as working directory. --justfile must also be set")
.requires("JUSTFILE")) .requires("JUSTFILE"))
.group(ArgGroup::with_name("EARLY-EXIT") .group(ArgGroup::with_name("EARLY-EXIT")
.args(&["DUMP", "EDIT", "LIST", "SHOW", "SUMMARY", "ARGUMENTS", "EVALUATE"])) .args(&["DUMP", "EDIT", "LIST", "SHOW", "SUMMARY", "ARGUMENTS", "EVALUATE"]))