From 0161775af35e9dc32ea4483a93d41e09c1db9ef9 Mon Sep 17 00:00:00 2001 From: m11o Date: Mon, 3 Apr 2023 00:37:14 +0900 Subject: [PATCH 1/3] pinky: move help strings to markdown file --- src/uu/pinky/pinky.md | 7 +++++++ src/uu/pinky/src/pinky.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/pinky/pinky.md diff --git a/src/uu/pinky/pinky.md b/src/uu/pinky/pinky.md new file mode 100644 index 000000000..9eadd3c44 --- /dev/null +++ b/src/uu/pinky/pinky.md @@ -0,0 +1,7 @@ +# pinky + +``` +pinky [OPTION]... [USER]... +``` + +Lightweight finger diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index 18f72638b..5aa14ac63 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -20,10 +20,10 @@ use std::os::unix::fs::MetadataExt; use clap::{crate_version, Arg, ArgAction, Command}; use std::path::PathBuf; -use uucore::format_usage; +use uucore::{format_usage, help_about, help_usage}; -static ABOUT: &str = "Lightweight finger"; -const USAGE: &str = "{} [OPTION]... [USER]..."; +static ABOUT: &str = help_about!("pinky.md"); +const USAGE: &str = help_usage!("pinky.md"); mod options { pub const LONG_FORMAT: &str = "long_format"; From 087767769709e58104833063084e3ecf343e4108 Mon Sep 17 00:00:00 2001 From: Masahito Osako <43847020+m11o@users.noreply.github.com> Date: Mon, 3 Apr 2023 07:26:34 +0900 Subject: [PATCH 2/3] Update src/uu/pinky/pinky.md Co-authored-by: Sylvestre Ledru --- src/uu/pinky/pinky.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/pinky/pinky.md b/src/uu/pinky/pinky.md index 9eadd3c44..965ae4cd0 100644 --- a/src/uu/pinky/pinky.md +++ b/src/uu/pinky/pinky.md @@ -4,4 +4,4 @@ pinky [OPTION]... [USER]... ``` -Lightweight finger +Displays brief user information on Unix-based systems From cae3e6d13f4f459bf87ab6222cce8fe27f91d1b3 Mon Sep 17 00:00:00 2001 From: Masahito Osako <43847020+m11o@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:57:01 +0900 Subject: [PATCH 3/3] Update src/uu/pinky/src/pinky.rs Co-authored-by: Daniel Hofstetter --- src/uu/pinky/src/pinky.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index 5aa14ac63..172a9e138 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -22,7 +22,7 @@ use clap::{crate_version, Arg, ArgAction, Command}; use std::path::PathBuf; use uucore::{format_usage, help_about, help_usage}; -static ABOUT: &str = help_about!("pinky.md"); +const ABOUT: &str = help_about!("pinky.md"); const USAGE: &str = help_usage!("pinky.md"); mod options {