diff options
-rw-r--r-- | doc/manual/generate-options.jq | 9 | ||||
-rw-r--r-- | src/libutil/config.cc | 1 |
2 files changed, 8 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("") diff --git a/src/libutil/config.cc b/src/libutil/config.cc index 4c5b80d49..e5297c653 100644 --- a/src/libutil/config.cc +++ b/src/libutil/config.cc @@ -139,6 +139,7 @@ nlohmann::json Config::toJSON() if (!s.second.isAlias) { auto obj = nlohmann::json::object(); obj.emplace("description", s.second.setting->description); + obj.emplace("aliases", s.second.setting->aliases); obj.emplace("value", s.second.setting->toJSON()); res.emplace(s.first, obj); } |