From 1ac31ccfa0db32f40b9600f92554c365fed1c964 Mon Sep 17 00:00:00 2001 From: m11o Date: Sun, 7 May 2023 00:27:16 +0900 Subject: [PATCH] tty: move help strings to markdown file --- src/uu/tty/src/tty.rs | 6 +++--- src/uu/tty/tty.md | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/tty/tty.md diff --git a/src/uu/tty/src/tty.rs b/src/uu/tty/src/tty.rs index e3fc0451e..e2d9d1847 100644 --- a/src/uu/tty/src/tty.rs +++ b/src/uu/tty/src/tty.rs @@ -14,10 +14,10 @@ use is_terminal::IsTerminal; use std::io::Write; use std::os::unix::io::AsRawFd; use uucore::error::{set_exit_code, UResult}; -use uucore::format_usage; +use uucore::{format_usage, help_about, help_usage}; -static ABOUT: &str = "Print the file name of the terminal connected to standard input."; -const USAGE: &str = "{} [OPTION]..."; +const ABOUT: &str = help_about!("tty.md"); +const USAGE: &str = help_usage!("tty.md"); mod options { pub const SILENT: &str = "silent"; diff --git a/src/uu/tty/tty.md b/src/uu/tty/tty.md new file mode 100644 index 000000000..230399a20 --- /dev/null +++ b/src/uu/tty/tty.md @@ -0,0 +1,7 @@ +# tty + +``` +tty [OPTION]... +``` + +Print the file name of the terminal connected to standard input.