mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +00:00
printenv: clap 3
This commit is contained in:
parent
c39a9b49d4
commit
8ba10936b0
2 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@ edition = "2018"
|
|||
path = "src/printenv.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "2.33", features = ["wrap_help"] }
|
||||
clap = { version = "3.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.10", package="uucore", path="../../uucore" }
|
||||
uucore_procs = { version=">=0.0.7", package="uucore_procs", path="../../uucore_procs" }
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ fn usage() -> String {
|
|||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
let usage = usage();
|
||||
|
||||
let matches = uu_app().usage(&usage[..]).get_matches_from(args);
|
||||
let matches = uu_app().override_usage(&usage[..]).get_matches_from(args);
|
||||
|
||||
let variables: Vec<String> = matches
|
||||
.values_of(ARG_VARIABLES)
|
||||
|
@ -61,19 +61,19 @@ 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(OPT_NULL)
|
||||
.short("0")
|
||||
Arg::new(OPT_NULL)
|
||||
.short('0')
|
||||
.long(OPT_NULL)
|
||||
.help("end each output line with 0 byte rather than newline"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name(ARG_VARIABLES)
|
||||
.multiple(true)
|
||||
Arg::new(ARG_VARIABLES)
|
||||
.multiple_occurrences(true)
|
||||
.takes_value(true)
|
||||
.min_values(1),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue