mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
printf: add description and version
Adds a version number and brief description to the printf utility in the user documentation
This commit is contained in:
parent
1194a8ce53
commit
f6174dd946
1 changed files with 11 additions and 2 deletions
|
@ -9,6 +9,8 @@ use uucore::InvalidEncodingHandling;
|
|||
|
||||
const VERSION: &str = "version";
|
||||
const HELP: &str = "help";
|
||||
const USAGE: &str = "printf FORMATSTRING [ARGUMENT]...";
|
||||
const ABOUT: &str = "Print output based off of the format string and proceeding arguments.";
|
||||
static LONGHELP_LEAD: &str = "printf
|
||||
|
||||
USAGE: printf FORMATSTRING [ARGUMENT]...
|
||||
|
@ -295,7 +297,14 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
|
||||
pub fn uu_app<'a>() -> App<'a> {
|
||||
App::new(uucore::util_name())
|
||||
.arg(Arg::new(VERSION).long(VERSION))
|
||||
.arg(Arg::new(HELP).long(HELP))
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.override_usage(USAGE)
|
||||
.arg(Arg::new(HELP).long(HELP).help("Print help information"))
|
||||
.arg(
|
||||
Arg::new(VERSION)
|
||||
.long(VERSION)
|
||||
.help("Print version information"),
|
||||
)
|
||||
.setting(AppSettings::InferLongArgs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue