diff --git a/src/uu/basename/basename.md b/src/uu/basename/basename.md new file mode 100644 index 000000000..b17cac74a --- /dev/null +++ b/src/uu/basename/basename.md @@ -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 diff --git a/src/uu/basename/src/basename.rs b/src/uu/basename/src/basename.rs index 613c4d67c..ed7faee65 100644 --- a/src/uu/basename/src/basename.rs +++ b/src/uu/basename/src/basename.rs @@ -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_about, help_usage}; -static ABOUT: &str = r#"Print NAME with any leading directory components removed -If specified, also remove a trailing SUFFIX"#; +static ABOUT: &str = help_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";