diff --git a/how-it-works.md b/how-it-works.md index ed7aa089..9f36a2b5 100644 --- a/how-it-works.md +++ b/how-it-works.md @@ -19,7 +19,7 @@ with an expression: .a = .b ``` -Like math expression - operator precedence is important. +Like math expressions - operator precedence is important. The `=` operator takes two arguments, a `lhs` expression, which in this case is `.a` and `rhs` expression which is `.b`. @@ -47,7 +47,7 @@ b: dog ## Complex assignment, operator precedence rules -Just like math expression - `yq` expression have an order of precedence. The pipe `|` operator has a low order of precedence, so operators with higher precedence will get evaluated first. +Just like math expressions - `yq` expressions have an order of precedence. The pipe `|` operator has a low order of precedence, so operators with higher precedence will get evaluated first. Most of the time, this is intuitively what you'd want, for instance `.a = "cat" | .b = "dog"` is effectively: `(.a = "cat") | (.b = "dog")`. diff --git a/pkg/yqlib/doc/operators/anchor-and-alias-operators.md b/pkg/yqlib/doc/operators/anchor-and-alias-operators.md index 3e12bef3..08204a51 100644 --- a/pkg/yqlib/doc/operators/anchor-and-alias-operators.md +++ b/pkg/yqlib/doc/operators/anchor-and-alias-operators.md @@ -1,6 +1,6 @@ # Anchor and Alias Operators -Use the `alias` and `anchor` operators to read and write yaml aliases and anchors. The `explode` operator normalizes a yaml file (dereference (or expands) aliases and remove anchor names). +Use the `alias` and `anchor` operators to read and write yaml aliases and anchors. The `explode` operator normalises a yaml file (dereference (or expands) aliases and remove anchor names). `yq` supports merge aliases (like `<<: *blah`) however this is no longer in the standard yaml spec (1.2) and so `yq` will automatically add the `!!merge` tag to these nodes as it is effectively a custom tag. diff --git a/pkg/yqlib/doc/operators/eval.md b/pkg/yqlib/doc/operators/eval.md index c7699d29..eae33bd1 100644 --- a/pkg/yqlib/doc/operators/eval.md +++ b/pkg/yqlib/doc/operators/eval.md @@ -4,7 +4,7 @@ Use `eval` to dynamically process an expression - for instance from an environme `eval` takes a single argument, and evaluates that as a `yq` expression. Any valid expression can be used, beit a path `.a.b.c | select(. == "cat")`, or an update `.a.b.c = "gogo"`. -Tip: This can be useful way parameterize complex scripts. +Tip: This can be useful way parameterise complex scripts. {% hint style="warning" %} Note that versions prior to 4.18 require the 'eval/e' command to be specified. diff --git a/pkg/yqlib/doc/operators/headers/anchor-and-alias-operators.md b/pkg/yqlib/doc/operators/headers/anchor-and-alias-operators.md index 13466f16..5c6f29e5 100644 --- a/pkg/yqlib/doc/operators/headers/anchor-and-alias-operators.md +++ b/pkg/yqlib/doc/operators/headers/anchor-and-alias-operators.md @@ -1,6 +1,6 @@ # Anchor and Alias Operators -Use the `alias` and `anchor` operators to read and write yaml aliases and anchors. The `explode` operator normalizes a yaml file (dereference (or expands) aliases and remove anchor names). +Use the `alias` and `anchor` operators to read and write yaml aliases and anchors. The `explode` operator normalises a yaml file (dereference (or expands) aliases and remove anchor names). `yq` supports merge aliases (like `<<: *blah`) however this is no longer in the standard yaml spec (1.2) and so `yq` will automatically add the `!!merge` tag to these nodes as it is effectively a custom tag. diff --git a/pkg/yqlib/doc/operators/headers/eval.md b/pkg/yqlib/doc/operators/headers/eval.md index cb834d65..45c1a221 100644 --- a/pkg/yqlib/doc/operators/headers/eval.md +++ b/pkg/yqlib/doc/operators/headers/eval.md @@ -4,4 +4,4 @@ Use `eval` to dynamically process an expression - for instance from an environme `eval` takes a single argument, and evaluates that as a `yq` expression. Any valid expression can be used, beit a path `.a.b.c | select(. == "cat")`, or an update `.a.b.c = "gogo"`. -Tip: This can be useful way parameterize complex scripts. +Tip: This can be useful way parameterise complex scripts.