mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 12:37:49 +00:00
Merge pull request #3159 from crazystylus/expr-missing-help-docs
`expr`: fix missing help in user docs
This commit is contained in:
commit
bbd74bb957
1 changed files with 13 additions and 2 deletions
|
@ -14,12 +14,23 @@ mod tokens;
|
||||||
|
|
||||||
const VERSION: &str = "version";
|
const VERSION: &str = "version";
|
||||||
const HELP: &str = "help";
|
const HELP: &str = "help";
|
||||||
|
static ABOUT: &str = "Print the value of EXPRESSION to standard output";
|
||||||
|
static USAGE: &str = r#"
|
||||||
|
expr [EXPRESSION]
|
||||||
|
expr [OPTIONS]"#;
|
||||||
|
|
||||||
pub fn uu_app<'a>() -> App<'a> {
|
pub fn uu_app<'a>() -> App<'a> {
|
||||||
App::new(uucore::util_name())
|
App::new(uucore::util_name())
|
||||||
|
.version(crate_version!())
|
||||||
|
.about(ABOUT)
|
||||||
|
.override_usage(USAGE)
|
||||||
.setting(AppSettings::InferLongArgs)
|
.setting(AppSettings::InferLongArgs)
|
||||||
.arg(Arg::new(VERSION).long(VERSION))
|
.arg(
|
||||||
.arg(Arg::new(HELP).long(HELP))
|
Arg::new(VERSION)
|
||||||
|
.long(VERSION)
|
||||||
|
.help("output version information and exit"),
|
||||||
|
)
|
||||||
|
.arg(Arg::new(HELP).long(HELP).help("display this help and exit"))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[uucore::main]
|
#[uucore::main]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue