1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #4583 from piotrkwiecinski/join-move-string-to-md-file

join: move help strings to markdown file
This commit is contained in:
Daniel Hofstetter 2023-03-23 16:01:53 +01:00 committed by GitHub
commit 7853d3707b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 7 deletions

10
src/uu/join/join.md Normal file
View file

@ -0,0 +1,10 @@
# join
```
join [OPTIONS] <FILE1> <FILE2>
```
For each pair of input lines with identical join fields, write a line to
standard output. The default join field is the first, delimited by blanks.
When `FILE1` or `FILE2` (not both) is `-`, read standard input.

View file

@ -22,7 +22,10 @@ use std::num::IntErrorKind;
use std::os::unix::ffi::OsStrExt; use std::os::unix::ffi::OsStrExt;
use uucore::display::Quotable; use uucore::display::Quotable;
use uucore::error::{set_exit_code, UError, UResult, USimpleError}; use uucore::error::{set_exit_code, UError, UResult, USimpleError};
use uucore::{crash, crash_if_err}; use uucore::{crash, crash_if_err, format_usage, help_about, help_usage};
const ABOUT: &str = help_about!("join.md");
const USAGE: &str = help_usage!("join.md");
#[derive(Debug)] #[derive(Debug)]
enum JoinError { enum JoinError {
@ -699,12 +702,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
pub fn uu_app() -> Command { pub fn uu_app() -> Command {
Command::new(uucore::util_name()) Command::new(uucore::util_name())
.version(crate_version!()) .version(crate_version!())
.about( .about(ABOUT)
"For each pair of input lines with identical join fields, write a line to .override_usage(format_usage(USAGE))
standard output. The default join field is the first, delimited by blanks.
When FILE1 or FILE2 (not both) is -, read standard input.",
)
.infer_long_args(true) .infer_long_args(true)
.arg( .arg(
Arg::new("a") Arg::new("a")