mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 12:37:49 +00:00
Merge pull request #4425 from papparapa/tee-move-help-strings-to-md-file
tee: move help strings to markdown file
This commit is contained in:
commit
fb72641ff2
2 changed files with 16 additions and 4 deletions
|
@ -11,15 +11,16 @@ use std::io::{copy, sink, stdin, stdout, Error, ErrorKind, Read, Result, Write};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
use uucore::error::UResult;
|
use uucore::error::UResult;
|
||||||
use uucore::{format_usage, show_error};
|
use uucore::{format_usage, help_about, help_section, help_usage, show_error};
|
||||||
|
|
||||||
// spell-checker:ignore nopipe
|
// spell-checker:ignore nopipe
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use uucore::libc;
|
use uucore::libc;
|
||||||
|
|
||||||
static ABOUT: &str = "Copy standard input to each FILE, and also to standard output.";
|
const ABOUT: &str = help_about!("tee.md");
|
||||||
const USAGE: &str = "{} [OPTION]... [FILE]...";
|
const USAGE: &str = help_usage!("tee.md");
|
||||||
|
const AFTER_HELP: &str = help_section!("after help", "tee.md");
|
||||||
|
|
||||||
mod options {
|
mod options {
|
||||||
pub const APPEND: &str = "append";
|
pub const APPEND: &str = "append";
|
||||||
|
@ -88,7 +89,7 @@ pub fn uu_app() -> Command {
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.override_usage(format_usage(USAGE))
|
.override_usage(format_usage(USAGE))
|
||||||
.after_help("If a FILE is -, it refers to a file named - .")
|
.after_help(AFTER_HELP)
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::APPEND)
|
Arg::new(options::APPEND)
|
||||||
|
|
11
src/uu/tee/tee.md
Normal file
11
src/uu/tee/tee.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# tee
|
||||||
|
|
||||||
|
```
|
||||||
|
tee [OPTION]... [FILE]...
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy standard input to each FILE, and also to standard output.
|
||||||
|
|
||||||
|
## After Help
|
||||||
|
|
||||||
|
If a FILE is -, it refers to a file named - .
|
Loading…
Add table
Add a link
Reference in a new issue