relpath: move help strings to markdown file

This commit is contained in:
shaoyuteng 2023-03-10 20:44:28 +08:00 committed by Sylvestre Ledru
parent e5b6f63305
commit fcdb7e48ed
2 changed files with 11 additions and 3 deletions

View file

@ -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.

View file

@ -14,10 +14,10 @@ use uucore::display::println_verbatim;
use uucore::error::{FromIo, UResult}; use uucore::error::{FromIo, UResult};
use uucore::format_usage; use uucore::format_usage;
use uucore::fs::{canonicalize, MissingHandling, ResolveMode}; use uucore::fs::{canonicalize, MissingHandling, ResolveMode};
use uucore::{help_about, help_usage};
static ABOUT: &str = "Convert TO destination to the relative path from the FROM dir. const USAGE: &str = help_usage!("relpath.md");
If FROM path is omitted, current working dir will be used."; const ABOUT: &str = help_about!("relpath.md");
const USAGE: &str = "{} [-d DIR] TO [FROM]";
mod options { mod options {
pub const DIR: &str = "DIR"; pub const DIR: &str = "DIR";