Skip to content

YAML.sh v1.2.0 — the tiny parser writes back

Choose a tag to compare

@azohra azohra released this 02 Aug 06:49
v1.2.0
f241e6e

Version 1.2 turns YAML.sh from a read-only query engine into a writable YAML transformer—still one portable /bin/sh + AWK file.

Highlights:

  • recursive descent (..) and optional traversal (?)
  • array and object construction plus null input (-n)
  • arithmetic, string/sequence concatenation, and shallow mapping +
  • assignment (=), relative update (|=), compound updates, missing-path creation, and del(...)
  • semantic YAML output with -y / -o=yaml
  • permission-preserving in-place updates with -i
  • multi-document in-place safety: reject before replacement instead of dropping documents
  • 57 behavioral tests across macOS, Ubuntu, BusyBox AWK, and POSIX shell
  • 18 representative v1.2 expressions matched yq v4.53.3 byte-for-byte in JSON mode

The honest bit: YAML output preserves semantic structure, not comments or presentation style. Variables, reducers, dynamic keys, deep merge, style/comment operators, file operators, and non-YAML codecs remain outside this tiny, mischievous subset.

Docs: https://yaml.azohra.com/docs/#/queries