comm: move help strings to markdown file

This commit is contained in:
Daniel Hofstetter 2023-02-27 10:11:27 +01:00
parent c1d85adcc9
commit 028b97098d
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 uucore::error::FromIo;
use uucore::error::UResult;
use uucore::format_usage;
use uucore::{format_usage, help_about, help_usage};
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
static ABOUT: &str = "Compare two sorted files line by line";
static LONG_HELP: &str = "";
const USAGE: &str = "{} [OPTION]... FILE1 FILE2";
const ABOUT: &str = help_about!("comm.md");
const USAGE: &str = help_usage!("comm.md");
mod options {
pub const COLUMN_1: &str = "1";
@ -160,7 +159,6 @@ pub fn uu_app() -> Command {
Command::new(uucore::util_name())
.version(crate_version!())
.about(ABOUT)
.after_help(LONG_HELP)
.override_usage(format_usage(USAGE))
.infer_long_args(true)
.arg(