From f920d44e62de3060f9f338d24e78c2738a442918 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski Date: Mon, 3 Apr 2023 17:06:58 +0200 Subject: [PATCH] unexpand: move help strings to markdown file --- src/uu/unexpand/src/unexpand.rs | 7 +++---- src/uu/unexpand/unexpand.md | 8 ++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 src/uu/unexpand/unexpand.md diff --git a/src/uu/unexpand/src/unexpand.rs b/src/uu/unexpand/src/unexpand.rs index df2348a8c..da60aa1c2 100644 --- a/src/uu/unexpand/src/unexpand.rs +++ b/src/uu/unexpand/src/unexpand.rs @@ -19,11 +19,10 @@ use std::str::from_utf8; use unicode_width::UnicodeWidthChar; use uucore::display::Quotable; use uucore::error::{FromIo, UError, UResult}; -use uucore::{crash, crash_if_err, format_usage}; +use uucore::{crash, crash_if_err, format_usage, help_about, help_usage}; -static USAGE: &str = "{} [OPTION]... [FILE]..."; -static ABOUT: &str = "Convert blanks in each FILE to tabs, writing to standard output.\n\n\ - With no FILE, or when FILE is -, read standard input."; +const USAGE: &str = help_usage!("unexpand.md"); +const ABOUT: &str = help_about!("unexpand.md"); const DEFAULT_TABSTOP: usize = 8; diff --git a/src/uu/unexpand/unexpand.md b/src/uu/unexpand/unexpand.md new file mode 100644 index 000000000..6fc69b93a --- /dev/null +++ b/src/uu/unexpand/unexpand.md @@ -0,0 +1,8 @@ +# unexpand + +``` +unexpand [OPTION]... [FILE]... +``` + +Convert blanks in each `FILE` to tabs, writing to standard output. +With no `FILE`, or when `FILE` is `-`, read standard input.