mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
tty: clap 3
This commit is contained in:
parent
263357666f
commit
48c65934c7
2 changed files with 6 additions and 6 deletions
|
@ -15,7 +15,7 @@ edition = "2018"
|
|||
path = "src/tty.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "2.33", features = ["wrap_help"] }
|
||||
clap = { version = "3.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.42"
|
||||
atty = "0.2"
|
||||
uucore = { version=">=0.0.10", package="uucore", path="../../uucore", features=["fs"] }
|
||||
|
|
|
@ -33,8 +33,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
.accept_any();
|
||||
|
||||
let matches = uu_app()
|
||||
.usage(&usage[..])
|
||||
.get_matches_from_safe(args)
|
||||
.override_usage(&usage[..])
|
||||
.try_get_matches_from(args)
|
||||
.map_err(|e| UUsageError::new(2, format!("{}", e)))?;
|
||||
|
||||
let silent = matches.is_present(options::SILENT);
|
||||
|
@ -71,15 +71,15 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn uu_app() -> App<'static, 'static> {
|
||||
pub fn uu_app<'a>() -> App<'a> {
|
||||
App::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.arg(
|
||||
Arg::with_name(options::SILENT)
|
||||
Arg::new(options::SILENT)
|
||||
.long(options::SILENT)
|
||||
.visible_alias("quiet")
|
||||
.short("s")
|
||||
.short('s')
|
||||
.help("print nothing, only return an exit status")
|
||||
.required(false),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue