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:
parent
1c2a1ada96
commit
34e31f20e7
2 changed files with 15 additions and 6 deletions
12
src/uu/cp/cp.md
Normal file
12
src/uu/cp/cp.md
Normal 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.
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue