input_filename is always <stdin>
See original GitHub issueI would expect input_filename
to work like it does in jq, with yq however it always outputs <stdin>
.
Actual result:
$ yq 'input_filename' */problem.yaml
"<stdin>"
"<stdin>"
"<stdin>"
"<stdin>"
"<stdin>"
"<stdin>"
Expected result:
$ yq 'input_filename' */problem.yaml
"project_alpha/problem.yaml"
"project_zero/problem.yaml"
"questions/problem.yaml"
"research/problem.yaml"
"stuff/problem.yaml"
"test/problem.yaml"
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:11 (6 by maintainers)
Top Results From Across the Web
stdin(3) - Linux manual page - man7.org
The input stream is referred to as "standard input"; the output stream is referred to as "standard output"; and the error stream is...
Read more >Unix/Linux Shell I/O Redirection (including stdin, stdout, stderr ...
The cp command must always have an input file name. It never reads file data from standard input. 7.2 Redirection of standard input...
Read more >Why is STDIN_FILENO always zero? - Stack Overflow
When opened, the standard error stream is not fully buffered; the standard input and standard output streams are fully buffered if and only...
Read more >Edge case - detecting input on STDIN in perl
The inner script RIGHTLY thinks there's input on STDIN , it's just that another file open got file descriptor 0 (which, to perl,...
Read more >Programming in Lua : 21.1 - Lua.org
A call like io.input(filename) opens the given file (in read mode) and sets ... Moreover, write uses the current output file, whereas print...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
@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).