mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
groups: update to clap 4
This commit is contained in:
parent
6ee19a42a4
commit
6df2187397
2 changed files with 4 additions and 5 deletions
|
@ -15,7 +15,7 @@ edition = "2021"
|
|||
path = "src/groups.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["entries", "process"] }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -26,7 +26,7 @@ use uucore::{
|
|||
format_usage,
|
||||
};
|
||||
|
||||
use clap::{crate_version, Arg, Command};
|
||||
use clap::{crate_version, Arg, ArgAction, Command};
|
||||
|
||||
mod options {
|
||||
pub const USERS: &str = "USERNAME";
|
||||
|
@ -102,7 +102,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn uu_app<'a>() -> Command<'a> {
|
||||
pub fn uu_app() -> Command {
|
||||
Command::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
|
@ -110,8 +110,7 @@ pub fn uu_app<'a>() -> Command<'a> {
|
|||
.infer_long_args(true)
|
||||
.arg(
|
||||
Arg::new(options::USERS)
|
||||
.multiple_occurrences(true)
|
||||
.takes_value(true)
|
||||
.action(ArgAction::Append)
|
||||
.value_name(options::USERS)
|
||||
.value_hint(clap::ValueHint::Username),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue