mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
ls + vdir: move help strings to markdown file (#4454)
This commit is contained in:
parent
9d5dc500e6
commit
243fa21ce1
2 changed files with 17 additions and 9 deletions
12
src/uu/ls/ls.md
Normal file
12
src/uu/ls/ls.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# ls
|
||||||
|
|
||||||
|
```
|
||||||
|
ls [OPTION]... [FILE]...
|
||||||
|
```
|
||||||
|
|
||||||
|
List directory contents.
|
||||||
|
Ignore files and directories starting with a '.' by default
|
||||||
|
|
||||||
|
## After help
|
||||||
|
|
||||||
|
The TIME_STYLE argument can be full-iso, long-iso, iso, locale or +FORMAT. FORMAT is interpreted like in date. Also the TIME_STYLE environment variable sets the default style to use.
|
|
@ -55,17 +55,16 @@ use uucore::{
|
||||||
parse_size::parse_size,
|
parse_size::parse_size,
|
||||||
version_cmp::version_cmp,
|
version_cmp::version_cmp,
|
||||||
};
|
};
|
||||||
use uucore::{parse_glob, show, show_error, show_warning};
|
use uucore::{help_about, help_section, help_usage, parse_glob, show, show_error, show_warning};
|
||||||
|
|
||||||
#[cfg(not(feature = "selinux"))]
|
#[cfg(not(feature = "selinux"))]
|
||||||
static CONTEXT_HELP_TEXT: &str = "print any security context of each file (not enabled)";
|
static CONTEXT_HELP_TEXT: &str = "print any security context of each file (not enabled)";
|
||||||
#[cfg(feature = "selinux")]
|
#[cfg(feature = "selinux")]
|
||||||
static CONTEXT_HELP_TEXT: &str = "print any security context of each file";
|
static CONTEXT_HELP_TEXT: &str = "print any security context of each file";
|
||||||
|
|
||||||
const ABOUT: &str = r#"List directory contents.
|
const ABOUT: &str = help_about!("ls.md");
|
||||||
Ignore files and directories starting with a '.' by default"#;
|
const AFTER_HELP: &str = help_section!("after help", "ls.md");
|
||||||
|
const USAGE: &str = help_usage!("ls.md");
|
||||||
const USAGE: &str = "{} [OPTION]... [FILE]...";
|
|
||||||
|
|
||||||
pub mod options {
|
pub mod options {
|
||||||
pub mod format {
|
pub mod format {
|
||||||
|
@ -1621,10 +1620,7 @@ pub fn uu_app() -> Command {
|
||||||
.value_hint(clap::ValueHint::AnyPath)
|
.value_hint(clap::ValueHint::AnyPath)
|
||||||
.value_parser(ValueParser::os_string()),
|
.value_parser(ValueParser::os_string()),
|
||||||
)
|
)
|
||||||
.after_help(
|
.after_help(AFTER_HELP)
|
||||||
"The TIME_STYLE argument can be full-iso, long-iso, iso, locale or +FORMAT. FORMAT is interpreted like in date. \
|
|
||||||
Also the TIME_STYLE environment variable sets the default style to use.",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Represents a Path along with it's associated data.
|
/// Represents a Path along with it's associated data.
|
||||||
|
|
Loading…
Reference in a new issue