Skip to content

Commit

Permalink
cli: more jq compat
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Sep 12, 2021
1 parent ccf6cab commit c8f0264
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/interp/interp.jq
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def _main:
{
"compact": {
short: "-c",
long: "--compact",
long: "--compact-output",
description: "Compact output",
bool: true
},
Expand All @@ -472,7 +472,7 @@ def _main:
},
"expr_file": {
short: "-f",
long: "--file",
long: "--from-file",
description: "Read EXPR from file",
string: "PATH"
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/interp/testdata/args.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Tool, language and decoders for exploring binary data.
For more information see https://github.com/wader/fq

Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
--compact,-c Compact output
--compact-output,-c Compact output
--decode,-d NAME Decode format (probe)
--file,-f PATH Read EXPR from file
--formats Show supported formats
--from-file,-f PATH Read EXPR from file
--help,-h Show help
--include-path,-L PATH Include search path
--join-output,-j No newline between outputs
Expand Down
2 changes: 2 additions & 0 deletions pkg/interp/testdata/exprfile.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ $ fq -n -f /test.jq
123
$ fq -f /test2.jq /test.mp3
"ID3"
$ fq --from-file /test2.jq /test.mp3
"ID3"
$ fq -nf /err.jq
exitcode: 3
stderr:
Expand Down
Binary file modified pkg/interp/testdata/output.fqtest
Binary file not shown.

0 comments on commit c8f0264

Please sign in to comment.