diff --git a/src/uu/relpath/relpath.md b/src/uu/relpath/relpath.md new file mode 100644 index 000000000..a1ff9bf4a --- /dev/null +++ b/src/uu/relpath/relpath.md @@ -0,0 +1,8 @@ +# relpath + +``` +relpath [-d DIR] TO [FROM] +``` + +Convert TO destination to the relative path from the FROM dir. +If FROM path is omitted, current working dir will be used. \ No newline at end of file diff --git a/src/uu/relpath/src/relpath.rs b/src/uu/relpath/src/relpath.rs index 522cc54e5..ef7c43474 100644 --- a/src/uu/relpath/src/relpath.rs +++ b/src/uu/relpath/src/relpath.rs @@ -12,12 +12,11 @@ use std::env; use std::path::{Path, PathBuf}; use uucore::display::println_verbatim; use uucore::error::{FromIo, UResult}; -use uucore::format_usage; use uucore::fs::{canonicalize, MissingHandling, ResolveMode}; +use uucore::{format_usage, help_about, help_usage}; -static ABOUT: &str = "Convert TO destination to the relative path from the FROM dir. -If FROM path is omitted, current working dir will be used."; -const USAGE: &str = "{} [-d DIR] TO [FROM]"; +const USAGE: &str = help_usage!("relpath.md"); +const ABOUT: &str = help_about!("relpath.md"); mod options { pub const DIR: &str = "DIR";