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:
Terts Diepraam 2023-02-27 20:54:40 +01:00 committed by GitHub
commit f5a9ffe52f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 5 deletions

13
src/uu/comm/comm.md Normal file
View 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.

View file

@ -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(