nushell/docs/commands/def-env.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

25 lines
427 B
Markdown

---
title: def-env
layout: command
version: 0.59.0
---
Define a custom command, which participates in the caller environment
## Signature
```> def-env (def_name) (params) (block)```
## Parameters
- `def_name`: definition name
- `params`: parameters
- `block`: body of the definition
## Examples
Set environment variable by call a custom command
```shell
> def-env foo [] { let-env BAR = "BAZ" }; foo; $env.BAR
```