mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #4472 from wuseyu/dev
env: move help strings to a markdown file
This commit is contained in:
commit
8f623464ce
2 changed files with 17 additions and 6 deletions
13
src/uu/env/env.md
vendored
Normal file
13
src/uu/env/env.md
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# env
|
||||||
|
|
||||||
|
```
|
||||||
|
env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Set each NAME to VALUE in the environment and run COMMAND
|
||||||
|
|
||||||
|
|
||||||
|
## After Help
|
||||||
|
|
||||||
|
A mere - implies -i. If no COMMAND, print the resulting environment.
|
10
src/uu/env/src/env.rs
vendored
10
src/uu/env/src/env.rs
vendored
|
@ -23,13 +23,11 @@ use std::os::unix::process::ExitStatusExt;
|
||||||
use std::process;
|
use std::process;
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
use uucore::error::{UClapError, UResult, USimpleError, UUsageError};
|
use uucore::error::{UClapError, UResult, USimpleError, UUsageError};
|
||||||
use uucore::{format_usage, show_warning};
|
use uucore::{format_usage, help_about, help_section, help_usage, show_warning};
|
||||||
|
|
||||||
const ABOUT: &str = "Set each NAME to VALUE in the environment and run COMMAND";
|
const ABOUT: &str = help_about!("env.md");
|
||||||
const USAGE: &str = "{} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]";
|
const USAGE: &str = help_usage!("env.md");
|
||||||
const AFTER_HELP: &str = "\
|
const AFTER_HELP: &str = help_section!("after help", "env.md");
|
||||||
A mere - implies -i. If no COMMAND, print the resulting environment.
|
|
||||||
";
|
|
||||||
|
|
||||||
struct Options<'a> {
|
struct Options<'a> {
|
||||||
ignore_env: bool,
|
ignore_env: bool,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue