1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

paste: clap 3

This commit is contained in:
Terts Diepraam 2022-01-11 14:22:52 +01:00
parent 9efd6654f8
commit 8f7f3d18ee
2 changed files with 8 additions and 8 deletions

View file

@ -15,7 +15,7 @@ edition = "2018"
path = "src/paste.rs" path = "src/paste.rs"
[dependencies] [dependencies]
clap = { version = "2.33", features = ["wrap_help"] } clap = { version = "3.0", features = ["wrap_help", "cargo"] }
uucore = { version=">=0.0.10", package="uucore", path="../../uucore" } uucore = { version=">=0.0.10", package="uucore", path="../../uucore" }
uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" } uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }

View file

@ -48,29 +48,29 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
paste(files, serial, delimiters) paste(files, serial, delimiters)
} }
pub fn uu_app() -> App<'static, 'static> { pub fn uu_app<'a>() -> App<'a> {
App::new(uucore::util_name()) App::new(uucore::util_name())
.version(crate_version!()) .version(crate_version!())
.about(ABOUT) .about(ABOUT)
.arg( .arg(
Arg::with_name(options::SERIAL) Arg::new(options::SERIAL)
.long(options::SERIAL) .long(options::SERIAL)
.short("s") .short('s')
.help("paste one file at a time instead of in parallel"), .help("paste one file at a time instead of in parallel"),
) )
.arg( .arg(
Arg::with_name(options::DELIMITER) Arg::new(options::DELIMITER)
.long(options::DELIMITER) .long(options::DELIMITER)
.short("d") .short('d')
.help("reuse characters from LIST instead of TABs") .help("reuse characters from LIST instead of TABs")
.value_name("LIST") .value_name("LIST")
.default_value("\t") .default_value("\t")
.hide_default_value(true), .hide_default_value(true),
) )
.arg( .arg(
Arg::with_name(options::FILE) Arg::new(options::FILE)
.value_name("FILE") .value_name("FILE")
.multiple(true) .multiple_occurrences(true)
.default_value("-"), .default_value("-"),
) )
} }