mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 20:47:46 +00:00
sleep: update to clap 4
This commit is contained in:
parent
4d52449667
commit
6a98c4c7d0
2 changed files with 4 additions and 5 deletions
|
@ -15,7 +15,7 @@ edition = "2021"
|
|||
path = "src/sleep.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" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -13,7 +13,7 @@ use uucore::{
|
|||
format_usage,
|
||||
};
|
||||
|
||||
use clap::{crate_version, Arg, Command};
|
||||
use clap::{crate_version, Arg, ArgAction, Command};
|
||||
|
||||
static ABOUT: &str = "Pause for NUMBER seconds.";
|
||||
const USAGE: &str = "\
|
||||
|
@ -41,7 +41,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)
|
||||
|
@ -52,8 +52,7 @@ pub fn uu_app<'a>() -> Command<'a> {
|
|||
Arg::new(options::NUMBER)
|
||||
.help("pause for NUMBER seconds")
|
||||
.value_name(options::NUMBER)
|
||||
.index(1)
|
||||
.multiple_occurrences(true)
|
||||
.action(ArgAction::Append)
|
||||
.required(true),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue