summaryrefslogtreecommitdiff
path: root/xmake/core/base/option.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/option.lua')
-rw-r--r--xmake/core/base/option.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index 4037e6331..a6a87ad7c 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -1108,6 +1108,26 @@ function option.show_options(options)
end
end
end
+
+ -- print values
+ local values = opt.values
+ if type(values) == "function" then
+ values = values()
+ end
+ if values then
+
+ for _, value in ipairs(table.wrap(values)) do
+
+ -- make spaces
+ local spaces = ""
+ for i = 0, padding do
+ spaces = spaces .. " "
+ end
+
+ -- print this value
+ print(option._inwidth_append(spaces, " - " .. tostring(value), padding + 1, console_width))
+ end
+ end
end
end