mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
mkfifo: clap 3
This commit is contained in:
parent
0e021e956a
commit
c8eddad610
2 changed files with 13 additions and 9 deletions
|
@ -15,7 +15,7 @@ edition = "2018"
|
||||||
path = "src/mkfifo.rs"
|
path = "src/mkfifo.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"
|
||||||
uucore = { version=">=0.0.10", package="uucore", path="../../uucore" }
|
uucore = { version=">=0.0.10", package="uucore", path="../../uucore" }
|
||||||
uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }
|
uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }
|
||||||
|
|
|
@ -69,27 +69,27 @@ 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())
|
||||||
.name(NAME)
|
.name(NAME)
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.usage(USAGE)
|
.override_usage(USAGE)
|
||||||
.about(SUMMARY)
|
.about(SUMMARY)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name(options::MODE)
|
Arg::new(options::MODE)
|
||||||
.short("m")
|
.short('m')
|
||||||
.long(options::MODE)
|
.long(options::MODE)
|
||||||
.help("file permissions for the fifo")
|
.help("file permissions for the fifo")
|
||||||
.default_value("0666")
|
.default_value("0666")
|
||||||
.value_name("0666"),
|
.value_name("0666"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name(options::SE_LINUX_SECURITY_CONTEXT)
|
Arg::new(options::SE_LINUX_SECURITY_CONTEXT)
|
||||||
.short(options::SE_LINUX_SECURITY_CONTEXT)
|
.short('Z')
|
||||||
.help("set the SELinux security context to default type"),
|
.help("set the SELinux security context to default type"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name(options::CONTEXT)
|
Arg::new(options::CONTEXT)
|
||||||
.long(options::CONTEXT)
|
.long(options::CONTEXT)
|
||||||
.value_name("CTX")
|
.value_name("CTX")
|
||||||
.help(
|
.help(
|
||||||
|
@ -97,5 +97,9 @@ pub fn uu_app() -> App<'static, 'static> {
|
||||||
or SMACK security context to CTX",
|
or SMACK security context to CTX",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(Arg::with_name(options::FIFO).hidden(true).multiple(true))
|
.arg(
|
||||||
|
Arg::new(options::FIFO)
|
||||||
|
.hide(true)
|
||||||
|
.multiple_occurrences(true),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue