mirror of
https://github.com/uutils/login.git
synced 2026-06-10 16:13:37 -07:00
Adapt to changes in uucore
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
# login
|
||||
|
||||
```
|
||||
login [-p] [-h host] [username] [ENV=VAR...]
|
||||
|
||||
login [-p] [-h host] -f username
|
||||
|
||||
login [-p] -r host
|
||||
```
|
||||
|
||||
begin session on the system
|
||||
@@ -5,10 +5,7 @@
|
||||
|
||||
use clap::crate_version;
|
||||
use clap::Command;
|
||||
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
||||
|
||||
const ABOUT: &str = help_about!("login.md");
|
||||
const USAGE: &str = help_usage!("login.md");
|
||||
use uucore::{error::UResult, format_usage};
|
||||
|
||||
#[uucore::main]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
@@ -17,9 +14,13 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
}
|
||||
|
||||
pub fn uu_app() -> Command {
|
||||
const USAGE: &str = "login [-p] [-h host] [username] [ENV=VAR...]
|
||||
login [-p] [-h host] -f username
|
||||
login [-p] -r host";
|
||||
|
||||
Command::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.about("begin session on the system")
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
// TODO
|
||||
|
||||
Reference in New Issue
Block a user