From a2668e143328880373771e7fc85fe24a8e6ecb65 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski Date: Sun, 19 Mar 2023 15:39:24 +0100 Subject: [PATCH] false: move move help strings to markdown file --- src/uu/false/false.md | 11 +++++++++++ src/uu/false/src/false.rs | 9 ++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 src/uu/false/false.md diff --git a/src/uu/false/false.md b/src/uu/false/false.md new file mode 100644 index 000000000..3f0594767 --- /dev/null +++ b/src/uu/false/false.md @@ -0,0 +1,11 @@ +# false + +``` +false +``` + +Returns false, an unsuccessful exit status. + +Immediately returns with the exit status `1`. When invoked with one of the recognized options it +will try to write the help or version text. Any IO error during this operation is diagnosed, yet +the program will also return `1`. diff --git a/src/uu/false/src/false.rs b/src/uu/false/src/false.rs index 3a74142e0..27b6be291 100644 --- a/src/uu/false/src/false.rs +++ b/src/uu/false/src/false.rs @@ -7,14 +7,9 @@ use clap::{Arg, ArgAction, Command}; use std::{ffi::OsString, io::Write}; use uucore::error::{set_exit_code, UResult}; +use uucore::help_about; -static ABOUT: &str = "\ -Returns false, an unsuccessful exit status. - -Immediately returns with the exit status `1`. When invoked with one of the recognized options it -will try to write the help or version text. Any IO error during this operation is diagnosed, yet -the program will also return `1`. -"; +const ABOUT: &str = help_about!("false.md"); #[uucore::main] pub fn uumain(args: impl uucore::Args) -> UResult<()> {