Skip to content

fix(builtins): add jq -R raw input and awk printf parens#388

Merged
chaliy merged 1 commit intomainfrom
claude/fix-368-369-awk-jq-Vvs93
Feb 28, 2026
Merged

fix(builtins): add jq -R raw input and awk printf parens#388
chaliy merged 1 commit intomainfrom
claude/fix-368-369-awk-jq-Vvs93

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Feb 28, 2026

Summary

  • jq: Implement -R/--raw-input flag — treats each input line as a JSON string instead of parsing as JSON. Also supports -Rs (slurp entire input as single string). Unblocks CSV processing patterns like jq -Rs 'split("\n")'.
  • awk: Support printf("format", args) parenthesized syntax in addition to existing printf "format", args. Common in awk scripts for JSON generation.

Root cause

Test plan

  • Added unit tests for jq -R, jq -Rs, and jq -Rs with split
  • Added unit tests for awk printf("format", args) and CSV-to-JSON pattern
  • Added spec tests: jq_raw_input, jq_raw_input_slurp, awk_printf_parens, awk_printf_parens_begin
  • All existing tests pass (AWK: 98, JQ: 115, Bash: 1214)
  • cargo clippy clean, cargo fmt clean

Closes #368
Closes #369

…form

- jq: implement -R/--raw-input flag that treats each input line as a JSON
  string instead of parsing as JSON. Also supports -Rs (slurp entire input
  as one string). Unblocks CSV processing patterns like
  `jq -Rs 'split("\n")'`.

- awk: support printf("format", args) parenthesized syntax in addition to
  existing printf "format", args. Common in awk scripts for JSON generation.

Closes #368
Closes #369
@chaliy chaliy merged commit 94ac5dd into main Feb 28, 2026
16 checks passed
@chaliy chaliy deleted the claude/fix-368-369-awk-jq-Vvs93 branch March 12, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants