17 lines
1.0 KiB
JSON
17 lines
1.0 KiB
JSON
{
|
|
"name": "env",
|
|
"section": 1,
|
|
"title": "set the environment for command invocation",
|
|
"synopsis": ["env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]"],
|
|
"description": "Without **COMMAND**, prints the environment sorted by name. With **`-i`** / **`--ignore-environment`**, the environment for the utility starts empty (plus any **`NAME=value`** assignments before the utility). The utility runs via **`ctx.runBinCommand`**. While the utility runs, **`ctx.vfs.env`** (and **`ctx.env`** when present) are temporarily replaced and restored afterward so the parent session is unchanged.",
|
|
"options": [
|
|
{ "flag": "-i, --ignore-environment", "meaning": "Start with an empty environment before applying assignments." }
|
|
],
|
|
"keywords": ["env", "bare-os", "coreutils"],
|
|
"examples": [
|
|
{ "caption": "print environment", "code": "env" },
|
|
{ "caption": "minimal env and run", "code": "env -i PATH=/bin printf '%s' ok" },
|
|
{ "caption": "override for one command", "code": "env VAR=value mycmd" }
|
|
]
|
|
}
|