mirror of
https://github.com/uutils/coreutils
synced 2024-07-21 09:54:42 +00:00
dircolors: move help strings to markdown file
This commit is contained in:
parent
44ef16fa25
commit
ba4a9a05a1
13
src/uu/dircolors/dircolors.md
Normal file
13
src/uu/dircolors/dircolors.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# dircolors
|
||||
|
||||
```
|
||||
dircolors [OPTION]... [FILE]
|
||||
```
|
||||
|
||||
Output commands to set the LS_COLORS environment variable.
|
||||
|
||||
## After Help
|
||||
|
||||
If FILE is specified, read it to determine which colors to use for which
|
||||
file types and extensions. Otherwise, a precompiled database is used.
|
||||
For details on the format of these files, run 'dircolors --print-database'
|
|
@ -16,6 +16,7 @@ use std::io::{BufRead, BufReader};
|
|||
use clap::{crate_version, Arg, ArgAction, Command};
|
||||
use uucore::display::Quotable;
|
||||
use uucore::error::{UResult, USimpleError, UUsageError};
|
||||
use uucore::{help_about, help_section, help_usage};
|
||||
|
||||
mod options {
|
||||
pub const BOURNE_SHELL: &str = "bourne-shell";
|
||||
|
@ -25,13 +26,9 @@ mod options {
|
|||
pub const FILE: &str = "FILE";
|
||||
}
|
||||
|
||||
static USAGE: &str = "{} [OPTION]... [FILE]";
|
||||
static ABOUT: &str = "Output commands to set the LS_COLORS environment variable.";
|
||||
static LONG_HELP: &str = "
|
||||
If FILE is specified, read it to determine which colors to use for which
|
||||
file types and extensions. Otherwise, a precompiled database is used.
|
||||
For details on the format of these files, run 'dircolors --print-database'
|
||||
";
|
||||
const USAGE: &str = help_usage!("dircolors.md");
|
||||
const ABOUT: &str = help_about!("dircolors.md");
|
||||
const AFTER_HELP: &str = help_section!("after help", "dircolors.md");
|
||||
|
||||
mod colors;
|
||||
use self::colors::INTERNAL_DB;
|
||||
|
@ -170,7 +167,7 @@ pub fn uu_app() -> Command {
|
|||
Command::new(uucore::util_name())
|
||||
.version(crate_version!())
|
||||
.about(ABOUT)
|
||||
.after_help(LONG_HELP)
|
||||
.after_help(AFTER_HELP)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
.arg(
|
||||
|
|
Loading…
Reference in a new issue