Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support input_filename #144

Open
jyn514 opened this issue Jan 3, 2024 · 0 comments
Open

support input_filename #144

jyn514 opened this issue Jan 3, 2024 · 0 comments

Comments

@jyn514
Copy link

jyn514 commented Jan 3, 2024

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
───╯
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant