File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff 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}\n Usage: {usage}\n \n Arguments:\n {positionals}\n \n Options:\n {options}" )
25+ help_template = gettext( "{about}\n \n Usage: {usage}\n \n Arguments:\n {positionals}\n \n Options:\n {options}" ) ,
26+ disable_help_flag = true ,
27+ disable_version_flag = true ,
2628) ]
2729struct 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
4654enum TimeError {
You can’t perform that action at this time.
0 commit comments