mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
echo: move help strings to markdown file
This commit is contained in:
parent
199978694a
commit
c90c8ea214
2 changed files with 30 additions and 21 deletions
26
src/uu/echo/echo.md
Normal file
26
src/uu/echo/echo.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# echo
|
||||
|
||||
```
|
||||
echo [OPTIONS]... [STRING]...
|
||||
```
|
||||
|
||||
Display a line of text
|
||||
|
||||
## After Help
|
||||
|
||||
Echo the STRING(s) to standard output.
|
||||
|
||||
If -e is in effect, the following sequences are recognized:
|
||||
|
||||
\\ backslash
|
||||
\a alert (BEL)
|
||||
\b backspace
|
||||
\c produce no further output
|
||||
\e escape
|
||||
\f form feed
|
||||
\n new line
|
||||
\r carriage return
|
||||
\t horizontal tab
|
||||
\v vertical tab
|
||||
\0NNN byte with octal value NNN (1 to 3 digits)
|
||||
\xHH byte with hexadecimal value HH (1 to 2 digits)
|
|
@ -11,28 +11,11 @@ use std::io::{self, Write};
|
|||
use std::iter::Peekable;
|
||||
use std::str::Chars;
|
||||
use uucore::error::{FromIo, UResult};
|
||||
use uucore::format_usage;
|
||||
use uucore::{format_usage, help_about, help_section, help_usage};
|
||||
|
||||
const ABOUT: &str = "Display a line of text";
|
||||
const USAGE: &str = "{} [OPTIONS]... [STRING]...";
|
||||
const AFTER_HELP: &str = r#"
|
||||
Echo the STRING(s) to standard output.
|
||||
|
||||
If -e is in effect, the following sequences are recognized:
|
||||
|
||||
\\\\ backslash
|
||||
\\a alert (BEL)
|
||||
\\b backspace
|
||||
\\c produce no further output
|
||||
\\e escape
|
||||
\\f form feed
|
||||
\\n new line
|
||||
\\r carriage return
|
||||
\\t horizontal tab
|
||||
\\v vertical tab
|
||||
\\0NNN byte with octal value NNN (1 to 3 digits)
|
||||
\\xHH byte with hexadecimal value HH (1 to 2 digits)
|
||||
"#;
|
||||
const ABOUT: &str = help_about!("echo.md");
|
||||
const USAGE: &str = help_usage!("echo.md");
|
||||
const AFTER_HELP: &str = help_section!("after help", "echo.md");
|
||||
|
||||
mod options {
|
||||
pub const STRING: &str = "STRING";
|
||||
|
|
Loading…
Reference in a new issue