1
1
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:
Mattias Wadman 2021-09-05 12:46:21 +02:00
parent 8cb380e7d9
commit 538f4ffe71
3 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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
},

Binary file not shown.