mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
Merge pull request #4443 from cakebaker/comm_move_help_strings_to_markdown_file
comm: move help strings to markdown file
This commit is contained in:
commit
f5a9ffe52f
2 changed files with 16 additions and 5 deletions
13
src/uu/comm/comm.md
Normal file
13
src/uu/comm/comm.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# comm
|
||||||
|
|
||||||
|
```
|
||||||
|
comm [OPTION]... FILE1 FILE2
|
||||||
|
```
|
||||||
|
|
||||||
|
Compare two sorted files line by line.
|
||||||
|
|
||||||
|
When FILE1 or FILE2 (not both) is -, read standard input.
|
||||||
|
|
||||||
|
With no options, produce three-column output. Column one contains
|
||||||
|
lines unique to FILE1, column two contains lines unique to FILE2,
|
||||||
|
and column three contains lines common to both files.
|
|
@ -13,13 +13,12 @@ use std::io::{self, stdin, BufRead, BufReader, Stdin};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use uucore::error::FromIo;
|
use uucore::error::FromIo;
|
||||||
use uucore::error::UResult;
|
use uucore::error::UResult;
|
||||||
use uucore::format_usage;
|
use uucore::{format_usage, help_about, help_usage};
|
||||||
|
|
||||||
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
||||||
|
|
||||||
static ABOUT: &str = "Compare two sorted files line by line";
|
const ABOUT: &str = help_about!("comm.md");
|
||||||
static LONG_HELP: &str = "";
|
const USAGE: &str = help_usage!("comm.md");
|
||||||
const USAGE: &str = "{} [OPTION]... FILE1 FILE2";
|
|
||||||
|
|
||||||
mod options {
|
mod options {
|
||||||
pub const COLUMN_1: &str = "1";
|
pub const COLUMN_1: &str = "1";
|
||||||
|
@ -160,7 +159,6 @@ pub fn uu_app() -> Command {
|
||||||
Command::new(uucore::util_name())
|
Command::new(uucore::util_name())
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.after_help(LONG_HELP)
|
|
||||||
.override_usage(format_usage(USAGE))
|
.override_usage(format_usage(USAGE))
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
.arg(
|
.arg(
|
||||||
|
|
Loading…
Reference in a new issue