mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-02 23:34:48 +08:00
gitbook wip
This commit is contained in:
@@ -58,4 +58,5 @@ See the [documentation](https://mikefarah.gitbook.io/yq/) for more.
|
||||
|
||||
# BUGS / ISSUES / FEATURE REQUESTS
|
||||
|
||||
Please visit the GitHub page https://github.com/mikefarah/yq/.
|
||||
Please visit the GitHub page https://github.com/mikefarah/yq/.
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Add
|
||||
|
||||
Add behaves differently according to the type of the LHS:
|
||||
- arrays: concatenate
|
||||
- number scalars: arithmetic addition
|
||||
- string scalars: concatenate
|
||||
* arrays: concatenate
|
||||
* number scalars: arithmetic addition
|
||||
* string scalars: concatenate
|
||||
|
||||
Use `+=` as append assign for things like increment. Note that `.a += .x` is equivalent to running `.a = .a + .x`.
|
||||
+2
@@ -1 +1,3 @@
|
||||
# Alternative (Default value)
|
||||
|
||||
This operator is used to provide alternative (or default) values when a particular expression is either null or false.
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
# Encoder / Decoder
|
||||
|
||||
Encode operators will take the piped in object structure and encode it as a string in the desired format. The decode operators do the opposite, they take a formatted string and decode it into the relevant object structure.
|
||||
|
||||
Note that you can optionally pass an indent value to the encode functions (see below).
|
||||
|
||||
These operators are useful to process yaml documents that have stringified embeded yaml/json/props in them.
|
||||
These operators are useful to process yaml documents that have stringified embeded yaml/json/props in them.
|
||||
@@ -1 +1,2 @@
|
||||
# Flatten
|
||||
This recursively flattens arrays.
|
||||
@@ -1 +1,3 @@
|
||||
# Group By
|
||||
|
||||
This is used to group items in an array by an expression.
|
||||
Reference in New Issue
Block a user