Commit fed99d9b authored by V V's avatar V V

fixed help

parent 5e9e5ce4
......@@ -687,13 +687,13 @@ struct command commands[];
/* {{{ client methods */
void do_help (struct command *command, int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num <= 1);
assert (arg_num == 1);
if (ev) { mprint_start (ev); }
int total = 0;
mpush_color (ev, COLOR_YELLOW);
struct command *cmd = commands;
while (cmd->name) {
if (!arg_num || !strcmp (args[0].str, cmd->name)) {
if (!args[0].str || !strcmp (args[0].str, cmd->name)) {
mprintf (ev, "%s\n", cmd->desc);
total ++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment