mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
logname: clap 3
This commit is contained in:
parent
9951958b93
commit
ebaf5caae8
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ path = "src/logname.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
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 = { 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" }
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
.collect_str(InvalidEncodingHandling::Ignore)
|
.collect_str(InvalidEncodingHandling::Ignore)
|
||||||
.accept_any();
|
.accept_any();
|
||||||
|
|
||||||
let _ = uu_app().usage(usage()).get_matches_from(args);
|
let _ = uu_app().override_usage(usage()).get_matches_from(args);
|
||||||
|
|
||||||
match get_userlogin() {
|
match get_userlogin() {
|
||||||
Some(userlogin) => println!("{}", userlogin),
|
Some(userlogin) => println!("{}", userlogin),
|
||||||
|
@ -55,7 +55,7 @@ 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(SUMMARY)
|
.about(SUMMARY)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue