mirror of
https://github.com/nushell/nushell.git
synced 2025-06-01 15:46:04 +02:00
fix kv set
examples (#15769)
As talked in #15588, I have updated the examples of `kv set` so that it correctly shows how to use the command with closures.
This commit is contained in:
parent
457f162fd9
commit
5483519c7d
@ -21,8 +21,13 @@
|
||||
@example "Store a number" {
|
||||
kv set foo 5
|
||||
}
|
||||
@example "Update a number" {
|
||||
kv set foo { $in + 1 }
|
||||
@example "Update a number and return it" {
|
||||
let $new_foo = (kv get foo | kv set foo { $in + 1 } --return value)
|
||||
}
|
||||
@example "Use a single pipeline with closures" {
|
||||
ls
|
||||
| kv set names { get name }
|
||||
| kv set sizes { get size }
|
||||
}
|
||||
export def "kv set" [
|
||||
key: string
|
||||
|
Loading…
x
Reference in New Issue
Block a user