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

cp: move help strings to markdown file (#4372)

* cp: move help strings to markdown file

* cp: change markdown section order
This commit is contained in:
papparapa 2023-02-16 19:23:32 +09:00 committed by GitHub
parent 1c2a1ada96
commit 34e31f20e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

12
src/uu/cp/cp.md Normal file
View file

@ -0,0 +1,12 @@
# cp
## Usage
```
cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...
```
## About
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

View file

@ -40,7 +40,7 @@ use uucore::error::{set_exit_code, UClapError, UError, UResult, UUsageError};
use uucore::fs::{
canonicalize, paths_refer_to_same_file, FileInformation, MissingHandling, ResolveMode,
};
use uucore::{crash, format_usage, prompt_yes, show_error, show_warning};
use uucore::{crash, format_usage, help_section, help_usage, prompt_yes, show_error, show_warning};
use crate::copydir::copy_directory;
@ -228,13 +228,10 @@ pub struct Options {
progress_bar: bool,
}
static ABOUT: &str = "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.";
const ABOUT: &str = help_section!("about", "cp.md");
static EXIT_ERR: i32 = 1;
const USAGE: &str = "\
{} [OPTION]... [-T] SOURCE DEST
{} [OPTION]... SOURCE... DIRECTORY
{} [OPTION]... -t DIRECTORY SOURCE...";
const USAGE: &str = help_usage!("cp.md");
// Argument constants
mod options {