From dc76939de901329670c668720bfcc48a1bd4881c Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski Date: Wed, 22 Mar 2023 15:28:12 +0100 Subject: [PATCH] hostid: move help strings to markdown file --- src/uu/hostid/hostid.md | 7 +++++++ src/uu/hostid/src/hostid.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/hostid/hostid.md diff --git a/src/uu/hostid/hostid.md b/src/uu/hostid/hostid.md new file mode 100644 index 000000000..940cf5e5d --- /dev/null +++ b/src/uu/hostid/hostid.md @@ -0,0 +1,7 @@ +# hostid + +``` +hostid [options] +``` + +Print the numeric identifier (in hexadecimal) for the current host diff --git a/src/uu/hostid/src/hostid.rs b/src/uu/hostid/src/hostid.rs index 147c7c548..3657d137a 100644 --- a/src/uu/hostid/src/hostid.rs +++ b/src/uu/hostid/src/hostid.rs @@ -9,10 +9,10 @@ use clap::{crate_version, Command}; use libc::c_long; -use uucore::{error::UResult, format_usage}; +use uucore::{error::UResult, format_usage, help_about, help_usage}; -const USAGE: &str = "{} [options]"; -const ABOUT: &str = "Print the numeric identifier (in hexadecimal) for the current host"; +const USAGE: &str = help_usage!("hostid.md"); +const ABOUT: &str = help_about!("hostid.md"); // currently rust libc interface doesn't include gethostid extern "C" {