Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/uu/false/src/false.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@ pub fn uumain(mut args: impl uucore::Args) -> i32 {
1
}

/// GNU coreutils prints the usage line before the about text for `true`/`false`.
const HELP_TEMPLATE: &str = "\
Usage: false [ignored command line arguments]\n\n\
{about-with-newline}\
{options}\
";

pub fn uu_app() -> Command {
Command::new("false")
.version(crate_version!())
.help_template(uucore::localized_help_template("false"))
.help_template(HELP_TEMPLATE)
.about(translate!("false-about"))
// We provide our own help and version options, to ensure maximum compatibility with GNU.
.disable_help_flag(true)
Expand Down
9 changes: 8 additions & 1 deletion src/uu/true/src/true.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ pub fn uumain(mut args: impl uucore::Args) -> i32 {
0
}

/// GNU coreutils prints the usage line before the about text for `true`/`false`.
const HELP_TEMPLATE: &str = "\
Usage: true [ignored command line arguments]\n\n\
{about-with-newline}\
{options}\
";

pub fn uu_app() -> Command {
Command::new("true")
.version(crate_version!())
.help_template(uucore::localized_help_template("true"))
.help_template(HELP_TEMPLATE)
.about(translate!("true-about"))
// We provide our own help and version options, to ensure maximum compatibility with GNU.
.disable_help_flag(true)
Expand Down
Loading