Skip to content

Commit

Permalink
help: Show default option value as JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Mar 4, 2023
1 parent a6370ec commit c75a83c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions format/csv/testdata/help_csv.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -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
===============
Expand Down
6 changes: 3 additions & 3 deletions format/xml/testdata/help_html.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -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
===============
Expand Down
6 changes: 3 additions & 3 deletions format/xml/testdata/help_xml.fqtest
Original file line number Diff line number Diff line change
Expand Up @@ -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
===============
Expand Down
2 changes: 1 addition & 1 deletion pkg/interp/help.jq
Original file line number Diff line number Diff line change
Expand Up @@ -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"
, "======="
, ""
Expand Down

0 comments on commit c75a83c

Please sign in to comment.