01mf02 / jaq

A jq clone focussed on correctness, speed, and simplicity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support `input_filename`

jyn514 opened this issue · comments

commented

jq documents input_filename as follows: https://jqlang.github.io/jq/manual/#input_filename

Returns the name of the file whose input is currently being filtered. Note that this will not work well unless jq is running in a UTF-8 locale.

jaq returns an error instead.

Error: undefined filter
   ╭─[<unknown>:1:35]
   │
 1 │ select(.name == "asdfasdfasdf") | input_filename
   │                                   ───────┬──────
   │                                          ╰──────── undefined filter
───╯