Comparison

prosodyctl @ 11133:624eafed3343

util.prosodyctl: Flip argument order "verb subject" feels better than "subject verb", especially since the subject (module) is optional.
author Kim Alvefur <zash@zash.se>
date Mon, 05 Oct 2020 21:17:29 +0200
parent 11006:8ac958938e0f
child 11134:3e3f22043552
comparison
equal deleted inserted replaced
11132:287d0d80aa57 11133:624eafed3343
76 function commands.install(arg) 76 function commands.install(arg)
77 if arg[1] == "--help" then 77 if arg[1] == "--help" then
78 show_usage([[install]], [[Installs a prosody/luarocks plugin]]); 78 show_usage([[install]], [[Installs a prosody/luarocks plugin]]);
79 return 1; 79 return 1;
80 end 80 end
81 call_luarocks(arg[1], "install") 81 call_luarocks("install", arg[1]);
82 end 82 end
83 83
84 function commands.remove(arg) 84 function commands.remove(arg)
85 if arg[1] == "--help" then 85 if arg[1] == "--help" then
86 show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); 86 show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]);
87 return 1; 87 return 1;
88 end 88 end
89 call_luarocks(arg[1], "remove") 89 call_luarocks("remove", arg[1])
90 end 90 end
91 91
92 function commands.list(arg) 92 function commands.list(arg)
93 if arg[1] == "--help" then 93 if arg[1] == "--help" then
94 show_usage([[list]], [[Shows installed rocks]]); 94 show_usage([[list]], [[Shows installed rocks]]);
95 return 1; 95 return 1;
96 end 96 end
97 call_luarocks(arg[1], "list") 97 call_luarocks("list", arg[1])
98 end 98 end
99 99
100 function commands.adduser(arg) 100 function commands.adduser(arg)
101 if not arg[1] or arg[1] == "--help" then 101 if not arg[1] or arg[1] == "--help" then
102 show_usage([[adduser JID]], [[Create the specified user account in Prosody]]); 102 show_usage([[adduser JID]], [[Create the specified user account in Prosody]]);