1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-17 12:16:17 +00:00

nohup: update to clap 4

This commit is contained in:
Terts Diepraam 2022-09-29 23:07:43 +02:00
parent 4b574d6228
commit 405e5fba67
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ edition = "2021"
path = "src/nohup.rs" path = "src/nohup.rs"
[dependencies] [dependencies]
clap = { version = "3.2", features = ["wrap_help", "cargo"] } clap = { version = "4.0", features = ["wrap_help", "cargo"] }
libc = "0.2.135" libc = "0.2.135"
atty = "0.2" atty = "0.2"
uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["fs"] } uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["fs"] }

View file

@ -10,7 +10,7 @@
#[macro_use] #[macro_use]
extern crate uucore; extern crate uucore;
use clap::{crate_version, Arg, Command}; use clap::{crate_version, Arg, ArgAction, Command};
use libc::{c_char, dup2, execvp, signal}; use libc::{c_char, dup2, execvp, signal};
use libc::{SIGHUP, SIG_IGN}; use libc::{SIGHUP, SIG_IGN};
use std::env; use std::env;
@ -114,7 +114,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Ok(()) Ok(())
} }
pub fn uu_app<'a>() -> Command<'a> { 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)
@ -124,7 +124,7 @@ pub fn uu_app<'a>() -> Command<'a> {
Arg::new(options::CMD) Arg::new(options::CMD)
.hide(true) .hide(true)
.required(true) .required(true)
.multiple_occurrences(true) .action(ArgAction::Append)
.value_hint(clap::ValueHint::CommandName), .value_hint(clap::ValueHint::CommandName),
) )
.trailing_var_arg(true) .trailing_var_arg(true)