mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 02:57:44 +00:00
Merge pull request #4391 from curtainp/basename-move-help-strings-to-md-file
basename: move help strings to markdown file
This commit is contained in:
commit
bd6d2e7898
2 changed files with 12 additions and 5 deletions
9
src/uu/basename/basename.md
Normal file
9
src/uu/basename/basename.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# basename
|
||||||
|
|
||||||
|
```
|
||||||
|
basename NAME [SUFFIX]
|
||||||
|
basename OPTION... NAME...
|
||||||
|
```
|
||||||
|
|
||||||
|
Print NAME with any leading directory components removed
|
||||||
|
If specified, also remove a trailing SUFFIX
|
|
@ -11,13 +11,11 @@ use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
use std::path::{is_separator, PathBuf};
|
use std::path::{is_separator, PathBuf};
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
use uucore::error::{UResult, UUsageError};
|
use uucore::error::{UResult, UUsageError};
|
||||||
use uucore::format_usage;
|
use uucore::{format_usage, help_about, help_usage};
|
||||||
|
|
||||||
static ABOUT: &str = r#"Print NAME with any leading directory components removed
|
static ABOUT: &str = help_about!("basename.md");
|
||||||
If specified, also remove a trailing SUFFIX"#;
|
|
||||||
|
|
||||||
const USAGE: &str = "{} NAME [SUFFIX]
|
const USAGE: &str = help_usage!("basename.md");
|
||||||
{} OPTION... NAME...";
|
|
||||||
|
|
||||||
pub mod options {
|
pub mod options {
|
||||||
pub static MULTIPLE: &str = "multiple";
|
pub static MULTIPLE: &str = "multiple";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue