aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm/confighelp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/rspamadm/confighelp.lua')
-rw-r--r--src/rspamadm/confighelp.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/rspamadm/confighelp.lua b/src/rspamadm/confighelp.lua
index 476065b2f..3af3c5b1f 100644
--- a/src/rspamadm/confighelp.lua
+++ b/src/rspamadm/confighelp.lua
@@ -3,7 +3,9 @@ local opts = {}
local known_attrs = {
data = 1,
example = 1,
- type = 1
+ type = 1,
+ required = 1,
+ default = 1,
}
--.USE "getopt"
@@ -74,6 +76,18 @@ local function print_help(key, value, tabs)
print('')
end
end
+ if type(value['required']) == 'boolean' then
+ if value['required'] then
+ print(string.format('%s\tRequired: %s', tabs,
+ maybe_print_color(tostring(value['required']))))
+ else
+ print(string.format('%s\tRequired: %s', tabs,
+ tostring(value['required'])))
+ end
+ end
+ if value['default'] then
+ print(string.format('%s\tDefault: %s', tabs, value['default']))
+ end
end
local sorted = sort_values(value)