mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
pr: move help strings to markdown file
This commit is contained in:
parent
398b33af31
commit
d8ee1833a4
2 changed files with 38 additions and 26 deletions
33
src/uu/pr/pr.md
Normal file
33
src/uu/pr/pr.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# pr
|
||||||
|
|
||||||
|
```
|
||||||
|
pr [OPTIONS] [files]...
|
||||||
|
```
|
||||||
|
|
||||||
|
Write content of given file or standard input to standard output with pagination filter
|
||||||
|
|
||||||
|
## After help
|
||||||
|
|
||||||
|
`+PAGE` Begin output at page number page of the formatted input.
|
||||||
|
`-COLUMN` Produce multi-column output. See `--column`
|
||||||
|
|
||||||
|
The pr utility is a printing and pagination filter
|
||||||
|
for text files. When multiple input files are specified,
|
||||||
|
each is read, formatted, and written to standard
|
||||||
|
output. By default, the input is separated
|
||||||
|
into 66-line pages, each with
|
||||||
|
|
||||||
|
o A 5-line header with the page number, date,
|
||||||
|
time, and the pathname of the file.
|
||||||
|
|
||||||
|
o A 5-line trailer consisting of blank lines.
|
||||||
|
|
||||||
|
If standard output is associated with a terminal,
|
||||||
|
diagnostic messages are suppressed until the pr
|
||||||
|
utility has completed processing.
|
||||||
|
|
||||||
|
When multiple column output is specified, text columns
|
||||||
|
are of equal width. By default, text columns
|
||||||
|
are separated by at least one `<blank>`. Input lines
|
||||||
|
that do not fit into a text column are truncated.
|
||||||
|
Lines are not truncated under single column output.
|
|
@ -21,33 +21,11 @@ use time::OffsetDateTime;
|
||||||
use quick_error::quick_error;
|
use quick_error::quick_error;
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
use uucore::error::UResult;
|
use uucore::error::UResult;
|
||||||
|
use uucore::{format_usage, help_about, help_section, help_usage};
|
||||||
|
|
||||||
const ABOUT: &str =
|
const ABOUT: &str = help_about!("pr.md");
|
||||||
"Write content of given file or standard input to standard output with pagination filter";
|
const USAGE: &str = help_usage!("pr.md");
|
||||||
const AFTER_HELP: &str =
|
const AFTER_HELP: &str = help_section!("after help", "pr.md");
|
||||||
" +PAGE\n Begin output at page number page of the formatted input.
|
|
||||||
-COLUMN\n Produce multi-column output. See --column
|
|
||||||
|
|
||||||
The pr utility is a printing and pagination filter
|
|
||||||
for text files. When multiple input files are specified,
|
|
||||||
each is read, formatted, and written to standard
|
|
||||||
output. By default, the input is separated
|
|
||||||
into 66-line pages, each with
|
|
||||||
|
|
||||||
o A 5-line header with the page number, date,
|
|
||||||
time, and the pathname of the file.
|
|
||||||
|
|
||||||
o A 5-line trailer consisting of blank lines.
|
|
||||||
|
|
||||||
If standard output is associated with a terminal,
|
|
||||||
diagnostic messages are suppressed until the pr
|
|
||||||
utility has completed processing.
|
|
||||||
|
|
||||||
When multiple column output is specified, text columns
|
|
||||||
are of equal width. By default text columns
|
|
||||||
are separated by at least one <blank>. Input lines
|
|
||||||
that do not fit into a text column are truncated.
|
|
||||||
Lines are not truncated under single column output.";
|
|
||||||
const TAB: char = '\t';
|
const TAB: char = '\t';
|
||||||
const LINES_PER_PAGE: usize = 66;
|
const LINES_PER_PAGE: usize = 66;
|
||||||
const LINES_PER_PAGE_FOR_FORM_FEED: usize = 63;
|
const LINES_PER_PAGE_FOR_FORM_FEED: usize = 63;
|
||||||
|
@ -195,6 +173,7 @@ pub fn uu_app() -> Command {
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.after_help(AFTER_HELP)
|
.after_help(AFTER_HELP)
|
||||||
|
.override_usage(format_usage(USAGE))
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
.args_override_self(true)
|
.args_override_self(true)
|
||||||
.disable_help_flag(true)
|
.disable_help_flag(true)
|
||||||
|
|
Loading…
Reference in a new issue