1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

chmod: move help strings to markdown file (#4392)

This commit is contained in:
curtain 2023-03-05 20:49:00 +08:00 committed by GitHub
parent 5449282a1a
commit dc0092c9e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 9 deletions

16
src/uu/chmod/chmod.md Normal file
View file

@ -0,0 +1,16 @@
<!-- spell-checker:ignore RFILE ugoa -->
# chmod
```
chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...
```
Change the mode of each FILE to MODE.
With --reference, change the mode of each FILE to that of RFILE.
## After Help
Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=]?[0-7]+'.

View file

@ -17,16 +17,11 @@ use uucore::fs::display_permissions_unix;
use uucore::libc::mode_t; use uucore::libc::mode_t;
#[cfg(not(windows))] #[cfg(not(windows))]
use uucore::mode; use uucore::mode;
use uucore::{format_usage, show, show_error}; use uucore::{format_usage, help_about, help_section, help_usage, show, show_error};
const ABOUT: &str = "Change the mode of each FILE to MODE.\n\ const ABOUT: &str = help_about!("chmod.md");
With --reference, change the mode of each FILE to that of RFILE."; const USAGE: &str = help_usage!("chmod.md");
const USAGE: &str = "\ const LONG_USAGE: &str = help_section!("after help", "chmod.md");
{} [OPTION]... MODE[,MODE]... FILE...
{} [OPTION]... OCTAL-MODE FILE...
{} [OPTION]... --reference=RFILE FILE...";
const LONG_USAGE: &str =
"Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=]?[0-7]+'.";
mod options { mod options {
pub const CHANGES: &str = "changes"; pub const CHANGES: &str = "changes";