1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 20:17:45 +00:00

basename: move help strings to markdown file

This commit is contained in:
curtain 2023-02-20 14:25:00 +08:00
parent 8678530095
commit ff6f61276e
No known key found for this signature in database
GPG key ID: 8FCF6EB27D528E38
2 changed files with 15 additions and 5 deletions

View file

@ -0,0 +1,12 @@
# basename
## Usage
```
basename NAME [SUFFIX]
basename OPTION... NAME...
```
## About
Print NAME with any leading directory components removed
If specified, also remove a trailing SUFFIX

View file

@ -11,13 +11,11 @@ use clap::{crate_version, Arg, ArgAction, Command};
use std::path::{is_separator, PathBuf};
use uucore::display::Quotable;
use uucore::error::{UResult, UUsageError};
use uucore::format_usage;
use uucore::{format_usage, help_usage, help_section};
static ABOUT: &str = r#"Print NAME with any leading directory components removed
If specified, also remove a trailing SUFFIX"#;
static ABOUT: &str = help_section!("about","basename.md");
const USAGE: &str = "{} NAME [SUFFIX]
{} OPTION... NAME...";
const USAGE: &str = help_usage!("basename.md");
pub mod options {
pub static MULTIPLE: &str = "multiple";