mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02:00
16 lines
590 B
Text
16 lines
590 B
Text
. | 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("")
|