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:
commit
59ad7a9128
4
format/csv/testdata/help_csv.fqtest
vendored
4
format/csv/testdata/help_csv.fqtest
vendored
@ -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
|
||||
===============
|
||||
|
6
format/xml/testdata/help_html.fqtest
vendored
6
format/xml/testdata/help_html.fqtest
vendored
@ -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
|
||||
===============
|
||||
|
6
format/xml/testdata/help_xml.fqtest
vendored
6
format/xml/testdata/help_xml.fqtest
vendored
@ -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
|
||||
===============
|
||||
|
@ -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"
|
||||
, "======="
|
||||
, ""
|
||||
|
Loading…
Reference in New Issue
Block a user