From 7b39fecaf9e3b7804b092de80f09732ad7dcea2b Mon Sep 17 00:00:00 2001 From: Koki Ueha Date: Mon, 6 Mar 2023 12:44:52 +0000 Subject: [PATCH 1/2] chroot: move help strings to markdown file --- src/uu/chroot/chroot.md | 7 +++++++ src/uu/chroot/src/chroot.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/chroot/chroot.md diff --git a/src/uu/chroot/chroot.md b/src/uu/chroot/chroot.md new file mode 100644 index 000000000..5baf89dc1 --- /dev/null +++ b/src/uu/chroot/chroot.md @@ -0,0 +1,7 @@ +# chroot + +``` +chroot [OPTION]... NEWROOT [COMMAND [ARG]...] +``` + +Run COMMAND with root directory set to NEWROOT. diff --git a/src/uu/chroot/src/chroot.rs b/src/uu/chroot/src/chroot.rs index c80b4ab87..2d1c3703e 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -19,10 +19,10 @@ use std::process; use uucore::error::{set_exit_code, UClapError, UResult, UUsageError}; use uucore::fs::{canonicalize, MissingHandling, ResolveMode}; use uucore::libc::{self, chroot, setgid, setgroups, setuid}; -use uucore::{entries, format_usage}; +use uucore::{entries, format_usage, help_about, help_usage}; -static ABOUT: &str = "Run COMMAND with root directory set to NEWROOT."; -static USAGE: &str = "{} [OPTION]... NEWROOT [COMMAND [ARG]...]"; +static ABOUT: &str = help_about!("chroot.md"); +static USAGE: &str = help_usage!("chroot.md"); mod options { pub const NEWROOT: &str = "newroot"; From dbf7bfde11c13a743347c370a4782cd048d81395 Mon Sep 17 00:00:00 2001 From: Koki Ueha Date: Mon, 6 Mar 2023 13:53:01 +0000 Subject: [PATCH 2/2] chroot: add an annotation for spell-checker --- src/uu/chroot/chroot.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uu/chroot/chroot.md b/src/uu/chroot/chroot.md index 5baf89dc1..3967d08f9 100644 --- a/src/uu/chroot/chroot.md +++ b/src/uu/chroot/chroot.md @@ -1,3 +1,4 @@ + # chroot ```