aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-29 13:46:27 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-29 13:46:27 +0100
commit6f1ac61c711a6bfcadc3f9072a9b172fb0c244a3 (patch)
treef6e5843f869da67be19a4f4f0a74710902a65568 /contrib
parentb8354b5a5790da9afc1a7c5025584cbcde9baef8 (diff)
downloadrspamd-6f1ac61c711a6bfcadc3f9072a9b172fb0c244a3.tar.gz
rspamd-6f1ac61c711a6bfcadc3f9072a9b172fb0c244a3.zip
[Minor] Try to improve help message
Diffstat (limited to 'contrib')
-rw-r--r--contrib/lua-argparse/argparse.lua15
1 files changed, 2 insertions, 13 deletions
diff --git a/contrib/lua-argparse/argparse.lua b/contrib/lua-argparse/argparse.lua
index 402f14a9b..48950a662 100644
--- a/contrib/lua-argparse/argparse.lua
+++ b/contrib/lua-argparse/argparse.lua
@@ -488,26 +488,15 @@ function Option:_get_label_lines()
return {table.concat(self._aliases, ", ")}
end
- local longest_alias_length = -1
-
- for _, alias in ipairs(self._aliases) do
- longest_alias_length = math.max(longest_alias_length, #alias)
- end
-
local argument_list_repr = table.concat(argument_list, " ")
local lines = {}
for i, alias in ipairs(self._aliases) do
- local line = (" "):rep(longest_alias_length - #alias) .. alias .. " " .. argument_list_repr
-
- if i ~= #self._aliases then
- line = line .. ","
- end
-
+ local line = alias .. " " .. argument_list_repr
table.insert(lines, line)
end
- return lines
+ return {table.concat(lines, ", ")}
end
function Command:_get_label_lines()