Skip to content

Commit 3509eb9

Browse files
authored
Merge pull request #340 from fox0/time-locale
time: Locales
2 parents 05d848d + d9b745d commit 3509eb9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

datetime/time.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ use plib::PROJECT_NAME;
2222
#[command(
2323
version,
2424
about = gettext("time - time a simple command or give resource usage"),
25-
help_template = gettext("{about-with-newline}\nUsage: {usage}\n\nArguments:\n{positionals}\n\nOptions:\n{options}")
25+
help_template = gettext("{about}\n\nUsage: {usage}\n\nArguments:\n{positionals}\n\nOptions:\n{options}"),
26+
disable_help_flag = true,
27+
disable_version_flag = true,
2628
)]
2729
struct Args {
2830
#[arg(
@@ -41,6 +43,12 @@ struct Args {
4143
help = gettext("Arguments for the utility")
4244
)]
4345
arguments: Vec<String>,
46+
47+
#[arg(short, long, help = gettext("Print help"), action = clap::ArgAction::HelpLong)]
48+
help: Option<bool>,
49+
50+
#[arg(short = 'V', long, help = gettext("Print version"), action = clap::ArgAction::Version)]
51+
version: Option<bool>,
4452
}
4553

4654
enum TimeError {

0 commit comments

Comments
 (0)