Support reading jq program/filter from file
chancez opened this issue · comments
Chance Zibolski commented
jq
has the following flag as an option:
o -f filename / --from-file filename:
Read filter from the file rather than from a command line, like awk's -f option. You can also use '#' to make comments.
faq
should have something similar.
Jimmy Zelinskie commented
This conflicts with the existing -f
flag which is for the input format, but I can understand the desire to add this functionality. A workaround could be using the party hat operator:
$ faq '.' <(cat myFile.json)
Chance Zibolski commented
I'm an idiot, this does exist.
-F, --program-file string If specified, read the file provided as the jq program for faq.
I even added it. I just had an old cached build around.
Jimmy Zelinskie commented
I wonder if we should swap the flags for compat, though.