mirror of
https://github.com/NixOS/nix
synced 2025-07-09 03:43:54 +02:00
List deprecated option aliases in the docs
This commit is contained in:
parent
acb99f03f9
commit
3c4f8c9175
2 changed files with 8 additions and 2 deletions
|
@ -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("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue