aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-22 00:11:39 +0100
committerKim Alvefur <zash@zash.se>2021-01-22 00:11:39 +0100
commita7fef46789354adb085f15acce5d3e1d3637e4dd (patch)
treee4373c27c9cd146f05d86d24d7aa78a6f7016f7c /prosodyctl
parentcd16ea631dde0f85f775bdfededf9a6b9b1d59d8 (diff)
downloadprosody-a7fef46789354adb085f15acce5d3e1d3637e4dd.tar.gz
prosody-a7fef46789354adb085f15acce5d3e1d3637e4dd.zip
prosodyctl: Reorganize help / command list
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl22
1 files changed, 15 insertions, 7 deletions
diff --git a/prosodyctl b/prosodyctl
index 20a1e8b3..9f62963b 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -643,19 +643,26 @@ local command_runner = async.runner(function ()
if not commands[command] then -- Show help for all commands
function show_usage(usage, desc)
- print(" "..usage);
- print(" "..desc);
+ print(string.format(" %-11s %s", usage, desc));
end
print("prosodyctl - Manage a Prosody server");
print("");
print("Usage: "..arg[0].." COMMAND [OPTIONS]");
print("");
- print("Where COMMAND may be one of:\n");
+ print("Where COMMAND may be one of:");
local hidden_commands = require "util.set".new{ "register", "unregister" };
- local commands_order = { "install", "remove", "list", "adduser", "passwd", "deluser", "start", "stop", "restart", "reload",
- "about" };
+ local commands_order = {
+ "Plugin management:",
+ "install"; "remove"; "list";
+ "User management:",
+ "adduser"; "passwd"; "deluser";
+ "Process management:",
+ "start"; "stop"; "restart"; "reload"; "status";
+ "Informative:",
+ "about",
+ };
local done = {};
@@ -663,15 +670,16 @@ local command_runner = async.runner(function ()
local command_func = commands[command_name];
if command_func then
command_func{ "--help" };
- print""
done[command_name] = true;
+ else
+ print""
+ print(command_name);
end
end
for command_name, command_func in pairs(commands) do
if not done[command_name] and not hidden_commands:contains(command_name) then
command_func{ "--help" };
- print""
done[command_name] = true;
end
end