mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
Merge pull request #4564 from miles170/head-move-help-strings-to-md-file
head: move help strings to markdown file
This commit is contained in:
commit
1a0ebdbb8a
2 changed files with 14 additions and 9 deletions
11
src/uu/head/head.md
Normal file
11
src/uu/head/head.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# head
|
||||
|
||||
```
|
||||
head [FLAG]... [FILE]...
|
||||
```
|
||||
|
||||
Print the first 10 lines of each `FILE` to standard output.
|
||||
With more than one `FILE`, precede each with a header giving the file name.
|
||||
With no `FILE`, or when `FILE` is `-`, read standard input.
|
||||
|
||||
Mandatory arguments to long flags are mandatory for short flags too.
|
|
@ -11,21 +11,15 @@ use std::io::{self, BufWriter, ErrorKind, Read, Seek, SeekFrom, Write};
|
|||
use uucore::display::Quotable;
|
||||
use uucore::error::{FromIo, UError, UResult, USimpleError};
|
||||
use uucore::lines::lines;
|
||||
use uucore::{format_usage, show};
|
||||
use uucore::{format_usage, help_about, help_usage, show};
|
||||
|
||||
const BUF_SIZE: usize = 65536;
|
||||
|
||||
/// The capacity in bytes for buffered writers.
|
||||
const BUFWRITER_CAPACITY: usize = 16_384; // 16 kilobytes
|
||||
|
||||
const ABOUT: &str = "\
|
||||
Print the first 10 lines of each FILE to standard output.\n\
|
||||
With more than one FILE, precede each with a header giving the file name.\n\
|
||||
With no FILE, or when FILE is -, read standard input.\n\
|
||||
\n\
|
||||
Mandatory arguments to long flags are mandatory for short flags too.\
|
||||
";
|
||||
const USAGE: &str = "{} [FLAG]... [FILE]...";
|
||||
const ABOUT: &str = help_about!("head.md");
|
||||
const USAGE: &str = help_usage!("head.md");
|
||||
|
||||
mod options {
|
||||
pub const BYTES_NAME: &str = "BYTES";
|
||||
|
|
Loading…
Reference in a new issue