jaq
jaq copied to clipboard
interpolation
The README mentions that string interpolation is supported, so it looks like the following example reveals a bug:
$ jq -n '"\(select(1) | null) xyzzy"'
"null xyzzy"
$ jaq -n '"\(select(1) | null) xyzzy"'
Error: Unexpected token while parsing string, expected b, r, ", n, t, \, f, /, u
╭─[<unknown>:1:3]
│
1 │ "\(select(1) | null) xyzzy"
· ┬
· ╰── Unexpected token (
───╯
Error: Unexpected end of input while parsing string, expected ", \
╭─[<unknown>:1:28]
│
1 │ "\(select(1) | null) xyzzy"
· │
· ╰─ Unexpected end of input
───╯
Oh dear! This is a misunderstanding; the README mentions string interpolation indeed, but the checkbox is not ticked to indicate that this is not implemented yet:
- [x] Identity (
.
) - [x] Recursion (
..
) - ...
- [ ] String interpolation
☝️
How can I make this clearer?
(And if you would like to see string interpolation in jaq, I would be very happy about a PR for it. ^^ It's probably not trivial, though.)
How can I make this clearer?
How about something like:
Here is an overview that summarizes:
☑ features that have been implemented ☐ features that remain to be implemented
That is a great idea. I implemented it in 1ef1994. Thanks!