Merge pull request #4491 from aiye123/main

relpath: move help strings to markdown file
This commit is contained in:
Daniel Hofstetter 2023-03-12 14:20:36 +01:00 committed by GitHub
commit 43ce6c1a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 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

@ -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";