diff options
Diffstat (limited to 'doc/manual/generate-options.jq')
-rw-r--r-- | doc/manual/generate-options.jq | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/manual/generate-options.jq b/doc/manual/generate-options.jq new file mode 100644 index 000000000..ccf62e8ed --- /dev/null +++ b/doc/manual/generate-options.jq @@ -0,0 +1,16 @@ +. | to_entries | sort_by(.key) | map( + " - `" + .key + "` \n\n" + + (.value.description | split("\n") | map(" " + . + "\n") | join("")) + "\n\n" + + " **Default:** " + ( + if .value.value == "" or .value.value == [] + then "*empty*" + elif (.value.value | type) == "array" + then "`" + (.value.value | join(" ")) + "`" + else "`" + (.value.value | tostring) + "`" + end) + + "\n\n" + + (if (.value.aliases | length) > 0 + then " **Deprecated alias:** " + (.value.aliases | map("`" + . + "`") | join(", ")) + "\n\n" + else "" + end) +) | join("") |