docs(std-rfc): use actual examples rather than doc comments (#15097)

# Description
Update examples with attributes.

# User-Facing Changes
`std-rfc` commands now have examples.

# Tests + Formatting
N/A

# After Submitting
N/A
This commit is contained in:
Bahex
2025-02-12 01:33:27 +03:00
committed by GitHub
parent 0430167f1c
commit f7d5162582
6 changed files with 151 additions and 237 deletions

View File

@ -16,13 +16,15 @@
#
# If the key already exists, it is updated
# to the new value provided.
#
# Usage:
# <input> | kv set <key> <value?>
#
# Example:
# ls ~ | kv set "home snapshot"
# kv set foo 5
@example "Store the list of files in the home directory" {
ls ~ | kv set "home snapshot"
}
@example "Store a number" {
kv set foo 5
}
@example "Update a number" {
kv set foo { $in + 1 }
}
export def "kv set" [
key: string
value_or_closure?: any
@ -97,9 +99,9 @@ export def "kv set" [
#
# Counterpart of "kv set". Returns null
# if the key is not found.
#
# Usage:
# kv get <key> | <pipeline>
@example "Retrieve a stored value" {
kv get foo
}
export def "kv get" [
key: string # Key of the kv-pair to retrieve
--universal (-u)