mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
stdbuf: move help strings to markdown file (#4792)
This commit is contained in:
parent
dffd2f082e
commit
746331cc65
2 changed files with 28 additions and 16 deletions
|
@ -17,23 +17,11 @@ use tempfile::tempdir;
|
|||
use tempfile::TempDir;
|
||||
use uucore::error::{FromIo, UResult, USimpleError, UUsageError};
|
||||
use uucore::parse_size::parse_size;
|
||||
use uucore::{crash, format_usage};
|
||||
use uucore::{crash, format_usage, help_about, help_section, help_usage};
|
||||
|
||||
static ABOUT: &str =
|
||||
"Run COMMAND, with modified buffering operations for its standard streams.\n\n\
|
||||
Mandatory arguments to long options are mandatory for short options too.";
|
||||
const USAGE: &str = "{} OPTION... COMMAND";
|
||||
static LONG_HELP: &str = "If MODE is 'L' the corresponding stream will be line buffered.\n\
|
||||
This option is invalid with standard input.\n\n\
|
||||
If MODE is '0' the corresponding stream will be unbuffered.\n\n\
|
||||
Otherwise MODE is a number which may be followed by one of the following:\n\n\
|
||||
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\
|
||||
In this case the corresponding stream will be fully buffered with the buffer size set to \
|
||||
MODE bytes.\n\n\
|
||||
NOTE: If COMMAND adjusts the buffering of its standard streams ('tee' does for e.g.) then \
|
||||
that will override corresponding settings changed by 'stdbuf'.\n\
|
||||
Also some filters (like 'dd' and 'cat' etc.) don't use streams for I/O, \
|
||||
and are thus unaffected by 'stdbuf' settings.\n";
|
||||
const ABOUT: &str = help_about!("stdbuf.md");
|
||||
const USAGE: &str = help_usage!("stdbuf.md");
|
||||
const LONG_HELP: &str = help_section!("after help", "stdbuf.md");
|
||||
|
||||
mod options {
|
||||
pub const INPUT: &str = "input";
|
||||
|
|
24
src/uu/stdbuf/stdbuf.md
Normal file
24
src/uu/stdbuf/stdbuf.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# stdbuf
|
||||
|
||||
```
|
||||
stdbuf [OPTION]... COMMAND
|
||||
```
|
||||
|
||||
Run `COMMAND`, with modified buffering operations for its standard streams.
|
||||
|
||||
Mandatory arguments to long options are mandatory for short options too.
|
||||
|
||||
## After Help
|
||||
|
||||
If `MODE` is 'L' the corresponding stream will be line buffered.
|
||||
This option is invalid with standard input.
|
||||
|
||||
If `MODE` is '0' the corresponding stream will be unbuffered.
|
||||
|
||||
Otherwise, `MODE` is a number which may be followed by one of the following:
|
||||
|
||||
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
|
||||
In this case the corresponding stream will be fully buffered with the buffer size set to `MODE` bytes.
|
||||
|
||||
NOTE: If `COMMAND` adjusts the buffering of its standard streams (`tee` does for e.g.) then that will override corresponding settings changed by `stdbuf`.
|
||||
Also some filters (like `dd` and `cat` etc.) don't use streams for I/O, and are thus unaffected by `stdbuf` settings.
|
Loading…
Add table
Add a link
Reference in a new issue