From e82ba6e7073fa1ff0cd3c42005cb4cecf70f075b Mon Sep 17 00:00:00 2001 From: m11o Date: Sat, 22 Apr 2023 16:10:26 +0900 Subject: [PATCH] readlink: move help strings to markdown file --- src/uu/readlink/readlink.md | 7 +++++++ src/uu/readlink/src/readlink.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/readlink/readlink.md diff --git a/src/uu/readlink/readlink.md b/src/uu/readlink/readlink.md new file mode 100644 index 000000000..7215acbec --- /dev/null +++ b/src/uu/readlink/readlink.md @@ -0,0 +1,7 @@ +# readlink + +``` +readlink [OPTION]... [FILE]... +``` + +Print value of a symbolic link or canonical file name. diff --git a/src/uu/readlink/src/readlink.rs b/src/uu/readlink/src/readlink.rs index 8afb184be..807f515d4 100644 --- a/src/uu/readlink/src/readlink.rs +++ b/src/uu/readlink/src/readlink.rs @@ -14,10 +14,10 @@ use std::path::{Path, PathBuf}; use uucore::display::Quotable; use uucore::error::{FromIo, UResult, USimpleError, UUsageError}; use uucore::fs::{canonicalize, MissingHandling, ResolveMode}; -use uucore::{format_usage, show_error}; +use uucore::{format_usage, show_error, help_about, help_usage}; -const ABOUT: &str = "Print value of a symbolic link or canonical file name."; -const USAGE: &str = "{} [OPTION]... [FILE]..."; +const ABOUT: &str = help_about!("readlink.md"); +const USAGE: &str = help_usage!("readlink.md"); const OPT_CANONICALIZE: &str = "canonicalize"; const OPT_CANONICALIZE_MISSING: &str = "canonicalize-missing"; const OPT_CANONICALIZE_EXISTING: &str = "canonicalize-existing";