mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
@ -26,7 +26,7 @@ Filter out all records where 'World' is null (Returns the table)
|
||||
> echo [["Hello" "World"]; [$nothing 3]]| compact World
|
||||
```
|
||||
|
||||
Filter out all instances of nothing from a list (Returns [1,2]
|
||||
Filter out all instances of nothing from a list (Returns [1,2])
|
||||
```shell
|
||||
> echo [1, $nothing, 2] | compact
|
||||
```
|
||||
|
@ -9,3 +9,10 @@ Export custom commands or environment variables from a module.
|
||||
## Signature
|
||||
|
||||
```> export ```
|
||||
|
||||
## Examples
|
||||
|
||||
Export a definition from a module
|
||||
```shell
|
||||
> module utils { export def my-command [] { "hello" } }; use utils my-command; my-command
|
||||
```
|
||||
|
@ -14,3 +14,10 @@ Define a signature for an external command
|
||||
|
||||
- `def_name`: definition name
|
||||
- `params`: parameters
|
||||
|
||||
## Examples
|
||||
|
||||
Write a signature for an external command
|
||||
```shell
|
||||
> extern echo [text: string]
|
||||
```
|
||||
|
@ -27,7 +27,7 @@ Base64 encode a string with default settings
|
||||
|
||||
Base64 encode a string with the binhex character set
|
||||
```shell
|
||||
> echo 'username:password' | hash base64 --character_set binhex --encode
|
||||
> echo 'username:password' | hash base64 --character-set binhex --encode
|
||||
```
|
||||
|
||||
Base64 decode a value
|
||||
|
@ -15,3 +15,10 @@ Runs external command
|
||||
- `...rest`: external command to run
|
||||
- `--redirect-stdout`: redirect-stdout
|
||||
- `--redirect-stderr`: redirect-stderr
|
||||
|
||||
## Examples
|
||||
|
||||
Run an external command
|
||||
```shell
|
||||
> run-external "echo" "-n" "hello"
|
||||
```
|
||||
|
Reference in New Issue
Block a user