mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
nohup: clap 3
This commit is contained in:
parent
5b13ec9c66
commit
5e9443567d
2 changed files with 6 additions and 6 deletions
|
@ -15,7 +15,7 @@ edition = "2018"
|
||||||
path = "src/nohup.rs"
|
path = "src/nohup.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"
|
||||||
atty = "0.2"
|
atty = "0.2"
|
||||||
uucore = { version=">=0.0.10", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { version=">=0.0.10", package="uucore", path="../../uucore", features=["fs"] }
|
||||||
|
|
|
@ -88,7 +88,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
.collect_str(InvalidEncodingHandling::ConvertLossy)
|
.collect_str(InvalidEncodingHandling::ConvertLossy)
|
||||||
.accept_any();
|
.accept_any();
|
||||||
|
|
||||||
let matches = uu_app().usage(&usage[..]).get_matches_from(args);
|
let matches = uu_app().override_usage(&usage[..]).get_matches_from(args);
|
||||||
|
|
||||||
replace_fds()?;
|
replace_fds()?;
|
||||||
|
|
||||||
|
@ -114,16 +114,16 @@ 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())
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.after_help(LONG_HELP)
|
.after_help(LONG_HELP)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name(options::CMD)
|
Arg::new(options::CMD)
|
||||||
.hidden(true)
|
.hide(true)
|
||||||
.required(true)
|
.required(true)
|
||||||
.multiple(true),
|
.multiple_occurrences(true),
|
||||||
)
|
)
|
||||||
.setting(AppSettings::TrailingVarArg)
|
.setting(AppSettings::TrailingVarArg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue