Merge pull request #4519 from miles170/whoami-move-help-strings-to-md-file

whoami: move help strings to markdown file
This commit is contained in:
Daniel Hofstetter 2023-03-16 16:00:05 +01:00 committed by GitHub
commit 5be450c925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -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
View file

@ -0,0 +1,7 @@
# whoami
```
whoami
```
Print the current username.