mirror of
https://github.com/wader/fq.git
synced 2024-11-10 10:11:39 +03:00
cli: add -nul-output compat
This commit is contained in:
parent
8cb380e7d9
commit
538f4ffe71
@ -70,8 +70,12 @@ def args_parse($args; $opts):
|
||||
( $opts
|
||||
| to_entries
|
||||
| map(
|
||||
( ({(.value.short): .key}? // {})
|
||||
+ ({(.value.long): .key}? // {})
|
||||
( . as $opt
|
||||
| [.value.short // empty] +
|
||||
[.value.long // empty] +
|
||||
(.value.aliases // [])
|
||||
| map({key: ., value: $opt.key})
|
||||
| from_entries
|
||||
)
|
||||
)
|
||||
| add
|
||||
|
@ -503,6 +503,8 @@ def _main:
|
||||
"null_output": {
|
||||
short: "-0",
|
||||
long: "--null-output",
|
||||
# for jq compatibility
|
||||
aliases: ["--nul-output"],
|
||||
description: "Null byte between outputs",
|
||||
bool: true
|
||||
},
|
||||
|
BIN
pkg/interp/testdata/output.fqtest
vendored
BIN
pkg/interp/testdata/output.fqtest
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user