diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index f651b80df..2c8bd082d 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -189,8 +189,9 @@ process(["help" | Mode]) -> ["help"] -> print_usage_help(MaxC, ShCode), ?STATUS_SUCCESS; - [CommandString | _] -> - print_usage_commands(CommandString, MaxC, ShCode), + [CmdString | _] -> + {ok, CmdStringU, _} = regexp:gsub(CmdString, "-", "_"), + print_usage_commands(CmdStringU, MaxC, ShCode), ?STATUS_SUCCESS end;