aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-20 11:13:17 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-20 11:13:17 +0200
commit3c4f8c91759ac5ed6a211f8e72b9d4e8438db833 (patch)
treec72f6dfd6258cb2ee606aa833a5f7b981e014858 /doc
parentacb99f03f963d00670e5a286c76a92d022ef44b0 (diff)
List deprecated option aliases in the docs
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/generate-options.jq9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/manual/generate-options.jq b/doc/manual/generate-options.jq
index e0cf496d6..ccf62e8ed 100644
--- a/doc/manual/generate-options.jq
+++ b/doc/manual/generate-options.jq
@@ -1,11 +1,16 @@
. | to_entries | sort_by(.key) | map(
" - `" + .key + "` \n\n"
+ (.value.description | split("\n") | map(" " + . + "\n") | join("")) + "\n\n"
- + " **Default**: " + (
+ + " **Default:** " + (
if .value.value == "" or .value.value == []
then "*empty*"
elif (.value.value | type) == "array"
then "`" + (.value.value | join(" ")) + "`"
- else "`" + (.value.value | tostring) + "`" end)
+ else "`" + (.value.value | tostring) + "`"
+ end)
+ "\n\n"
+ + (if (.value.aliases | length) > 0
+ then " **Deprecated alias:** " + (.value.aliases | map("`" + . + "`") | join(", ")) + "\n\n"
+ else ""
+ end)
) | join("")