diff --git a/src/base/help.lua b/src/base/help.lua index 42697c7f..eb5142c0 100644 --- a/src/base/help.lua +++ b/src/base/help.lua @@ -50,6 +50,11 @@ printf(" --%-" .. length .. "s %s", trigger, description) if (option.allowed) then + local function compareValue(a, b) + return a[1] < b[1] + end + table.sort(option.allowed, compareValue) + for _, value in ipairs(option.allowed) do printf(" %-" .. length-1 .. "s %s", value[1], value[2]) end