-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
input_filename is always <stdin> #84
Comments
Thanks for pointing this out. Although the value of |
Just took a look at your code. It seems to me you are concatenating all input files into one big stream. My guess would be that jq would need you to supply multiple separate input stream to make input_filename work. Don't know exactly how, but I'll try to figure out some more. |
Right. Literally supplying multiple input streams is technically possible (for example, via a bunch of temporary FIFOs), but cumbersome and could be less performant. |
@kislyuk how would you set the value of |
@vergenzt you can set the |
@kislyuk which command line option are you seeing that does that? I don't see anything mentioned about this in the documentation. And as far as I could tell in the codebase, the value returned by Code references: |
My current understanding is that the only way to control Would you be open to a PR adding some sort of (Or personally I'd be a fan of just testing whether there's a noticeable performance hit with a large number of files, and if there's not then just defaulting to making the FIFOs so that the default is for E.g. for original files |
@vergenzt I am open to the design you describe in principle, as long as it's not the default (since there are a lot more things that can potentially break with the fifo approach, I don't want to make it the default for now). |
@vergenzt you're right, there is no way to set |
How about checking with the jq authors to see if they're willing in include an argument of variable to enable this functionality? |
@qistoph please feel free to do that. However, I don't think it will solve this issue unless you also want to design a protocol for naming all documents in a stream and passing the names of those documents as a list to jq. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Omg! I'm so sorry! I really didn't notice it was a different tool that I'm using... |
I would expect
input_filename
to work like it does in jq, with yq however it always outputs<stdin>
.Actual result:
Expected result:
The text was updated successfully, but these errors were encountered: