1
1
mirror of https://github.com/wader/fq.git synced 2024-12-28 08:02:28 +03:00

Merge pull request #601 from wader/help-format-options-nice-example

help: Show default option value as JSON
This commit is contained in:
Mattias Wadman 2023-03-04 10:04:17 +01:00 committed by GitHub
commit 59ad7a9128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -4,8 +4,8 @@ csv: Comma separated values decoder
Options
=======
comma=, Separator character
comment=# Comment line character
comma="," Separator character
comment="#" Comment line character
Decode examples
===============

View File

@ -4,9 +4,9 @@ html: HyperText Markup Language decoder
Options
=======
array=false Decode as nested arrays
attribute_prefix=@ Prefix for attribute keys
seq=false Use seq attribute to preserve element order
array=false Decode as nested arrays
attribute_prefix="@" Prefix for attribute keys
seq=false Use seq attribute to preserve element order
Decode examples
===============

View File

@ -4,9 +4,9 @@ xml: Extensible Markup Language decoder
Options
=======
array=false Decode as nested arrays
attribute_prefix=@ Prefix for attribute keys
seq=false Use seq attribute to preserve element order
array=false Decode as nested arrays
attribute_prefix="@" Prefix for attribute keys
seq=false Use seq attribute to preserve element order
Decode examples
===============

View File

@ -144,7 +144,7 @@ def _help($arg0; $topic):
, if $f.decode_in_arg then
( $f.decode_in_arg
| to_entries
| map([" \(.key)=\(.value) ", $f.decode_in_arg_doc[.key]])
| map([" \(.key)=\(.value | tojson) ", $f.decode_in_arg_doc[.key]])
| "Options"
, "======="
, ""