From c1bd9e556eecc72ec0909da8ff99d4c0ba56e07e Mon Sep 17 00:00:00 2001 From: Miles Liu Date: Wed, 22 Mar 2023 11:19:50 +0800 Subject: [PATCH] users: move help strings to markdown file --- src/uu/users/src/users.rs | 6 +++--- src/uu/users/users.md | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/users/users.md diff --git a/src/uu/users/src/users.rs b/src/uu/users/src/users.rs index b812bfea1..05d656576 100644 --- a/src/uu/users/src/users.rs +++ b/src/uu/users/src/users.rs @@ -14,11 +14,11 @@ use std::path::Path; use clap::builder::ValueParser; use clap::{crate_version, Arg, Command}; use uucore::error::UResult; -use uucore::format_usage; use uucore::utmpx::{self, Utmpx}; +use uucore::{format_usage, help_about, help_usage}; -static ABOUT: &str = "Print the user names of users currently logged in to the current host"; -const USAGE: &str = "{} [FILE]"; +const ABOUT: &str = help_about!("users.md"); +const USAGE: &str = help_usage!("users.md"); static ARG_FILES: &str = "files"; diff --git a/src/uu/users/users.md b/src/uu/users/users.md new file mode 100644 index 000000000..7b126a0f0 --- /dev/null +++ b/src/uu/users/users.md @@ -0,0 +1,7 @@ +# users + +``` +users [FILE] +``` + +Print the user names of users currently logged in to the current host.