wc: move help strings to markdown file

This commit is contained in:
Alexander Kunde 2023-03-02 16:29:43 +01:00
parent b9bca794cc
commit 2bae3dd4f2
2 changed files with 12 additions and 4 deletions

View file

@ -15,7 +15,7 @@ use count_fast::{count_bytes_chars_and_lines_fast, count_bytes_fast};
use countable::WordCountable;
use unicode_width::UnicodeWidthChar;
use utf8::{BufReadDecoder, BufReadDecoderError};
use uucore::{format_usage, show};
use uucore::{format_usage, show, help_about, help_usage};
use word_count::{TitledWordCount, WordCount};
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
@ -98,9 +98,8 @@ impl Settings {
}
}
static ABOUT: &str = "Display newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. With no FILE, or when FILE is -, read standard input.";
const USAGE: &str = "{} [OPTION]... [FILE]...";
static ABOUT: &str = help_about!("wc.md");
const USAGE: &str = help_usage!("wc.md");
pub mod options {
pub static BYTES: &str = "bytes";

9
src/uu/wc/wc.md Normal file
View file

@ -0,0 +1,9 @@
# wc
## Usage
```
wc [OPTION]... [FILE]...
```
Display newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. With no FILE, or when FILE is -, read standard input.