mirror of
https://github.com/wader/fq.git
synced 2024-12-26 15:02:28 +03:00
0a043f9096
Now repl, slurp and help implemented using same query rewrite. Include filename context in error if possible. Add spew function that does opposite of slurp. Start of help infra, not done or documented yet. Show error pointer on parse error. Rename internal eval to _eval and make eval be wrapper that does rewrite and has various eror handling etc. Nicer repl, slupr and help errors.
66 lines
603 B
Plaintext
66 lines
603 B
Plaintext
# TODO: test for jq -R . <(echo -ne 'a\nb') <(echo c) produces "a" and "bc"
|
|
/a:
|
|
a
|
|
b
|
|
/c:
|
|
c
|
|
$ fq -R . /a /c
|
|
"a"
|
|
"b"
|
|
"c"
|
|
$ fq -Rs . /a /c
|
|
"a\nb\nc\n"
|
|
$ fq -nRs input /a /c
|
|
"a\nb\nc\n"
|
|
$ fq -nRs inputs /a /c
|
|
"a\nb\nc\n"
|
|
$ fq -R
|
|
"a"
|
|
"b"
|
|
"c"
|
|
stdin:
|
|
a
|
|
b
|
|
c
|
|
$ fq -nR input
|
|
"a"
|
|
stdin:
|
|
a
|
|
b
|
|
c
|
|
$ fq -nR inputs
|
|
"a"
|
|
"b"
|
|
"c"
|
|
stdin:
|
|
a
|
|
b
|
|
c
|
|
$ fq -Rs
|
|
"a\nb\nc\n"
|
|
stdin:
|
|
a
|
|
b
|
|
c
|
|
$ fq -nRs input
|
|
"a\nb\nc\n"
|
|
stdin:
|
|
a
|
|
b
|
|
c
|
|
$ fq -nRs inputs
|
|
"a\nb\nc\n"
|
|
stdin:
|
|
a
|
|
b
|
|
c
|
|
$ fq -R . missing
|
|
exitcode: 2
|
|
stderr:
|
|
error: missing: no such file or directory
|
|
$ fq -Rs . missing
|
|
""
|
|
exitcode: 2
|
|
stderr:
|
|
error: missing: no such file or directory
|