1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-18 04:36:18 +00:00

dirname: clap 3

This commit is contained in:
Terts Diepraam 2022-01-11 13:24:00 +01:00
parent 9bd1c3e967
commit db1e630c6c
2 changed files with 6 additions and 6 deletions

View file

@ -15,7 +15,7 @@ edition = "2018"
path = "src/dirname.rs" path = "src/dirname.rs"
[dependencies] [dependencies]
clap = { version = "2.33", features = ["wrap_help"] } clap = { version = "3.0", features = ["wrap_help", "cargo"] }
libc = "0.2.42" libc = "0.2.42"
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

@ -39,7 +39,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let after_help = get_long_usage(); let after_help = get_long_usage();
let matches = uu_app() let matches = uu_app()
.usage(&usage[..]) .override_usage(&usage[..])
.after_help(&after_help[..]) .after_help(&after_help[..])
.get_matches_from(args); .get_matches_from(args);
@ -83,15 +83,15 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Ok(()) Ok(())
} }
pub fn uu_app() -> App<'static, 'static> { pub fn uu_app<'a>() -> App<'a> {
App::new(uucore::util_name()) App::new(uucore::util_name())
.about(ABOUT) .about(ABOUT)
.version(crate_version!()) .version(crate_version!())
.arg( .arg(
Arg::with_name(options::ZERO) Arg::new(options::ZERO)
.long(options::ZERO) .long(options::ZERO)
.short("z") .short('z')
.help("separate output with NUL rather than newline"), .help("separate output with NUL rather than newline"),
) )
.arg(Arg::with_name(options::DIR).hidden(true).multiple(true)) .arg(Arg::new(options::DIR).hide(true).multiple_occurrences(true))
} }