Skip to content

Commit

Permalink
Merge pull request uutils#4472 from wuseyu/dev
Browse files Browse the repository at this point in the history
env: move help strings to a markdown file
  • Loading branch information
sylvestre authored Mar 8, 2023
2 parents 68b5845 + 3d4cea1 commit 8f62346
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
13 changes: 13 additions & 0 deletions src/uu/env/env.md
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 6 deletions src/uu/env/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ use std::os::unix::process::ExitStatusExt;
use std::process;
use uucore::display::Quotable;
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 USAGE: &str = "{} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]";
const AFTER_HELP: &str = "\
A mere - implies -i. If no COMMAND, print the resulting environment.
";
const ABOUT: &str = help_about!("env.md");
const USAGE: &str = help_usage!("env.md");
const AFTER_HELP: &str = help_section!("after help", "env.md");

struct Options<'a> {
ignore_env: bool,
Expand Down

0 comments on commit 8f62346

Please sign in to comment.