Merge pull request #4453 from schoki040/wc-move-help-strings-to-md-file

wc: move help strings to markdown file
This commit is contained in:
Sylvestre Ledru 2023-03-03 16:53:26 +01:00 committed by GitHub
commit eb21368535
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 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, help_about, help_usage, show};
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]...";
const ABOUT: &str = help_about!("wc.md");
const USAGE: &str = help_usage!("wc.md");
pub mod options {
pub static BYTES: &str = "bytes";

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

@ -0,0 +1,7 @@
# wc
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.