mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
whoami: move help strings to markdown file
This commit is contained in:
parent
f53df8ade5
commit
f623a7e13a
2 changed files with 11 additions and 1 deletions
|
@ -11,10 +11,12 @@ use clap::{crate_version, Command};
|
|||
|
||||
use uucore::display::println_verbatim;
|
||||
use uucore::error::{FromIo, UResult};
|
||||
use uucore::{format_usage, help_about, help_usage};
|
||||
|
||||
mod platform;
|
||||
|
||||
static ABOUT: &str = "Print the current username.";
|
||||
const ABOUT: &str = help_about!("whoami.md");
|
||||
const USAGE: &str = help_usage!("whoami.md");
|
||||
|
||||
#[uucore::main]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
|
@ -28,5 +30,6 @@ pub fn uu_app() -> Command {
|
|||
Command::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
}
|
||||
|
|
7
src/uu/whoami/whoami.md
Normal file
7
src/uu/whoami/whoami.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# whoami
|
||||
|
||||
```
|
||||
whoami
|
||||
```
|
||||
|
||||
Print the current username.
|
Loading…
Reference in a new issue