Get the arguments definition from the record (#3569)
This fixes "ejabberdctl help help"
This commit is contained in:
parent
327dc31e62
commit
f8a02f5d9d
|
@ -748,14 +748,13 @@ print_usage_command2(Cmd, C, MaxC, ShCode) ->
|
||||||
#ejabberd_commands{
|
#ejabberd_commands{
|
||||||
tags = TagsAtoms,
|
tags = TagsAtoms,
|
||||||
desc = Desc,
|
desc = Desc,
|
||||||
|
args = ArgsDef,
|
||||||
longdesc = LongDesc,
|
longdesc = LongDesc,
|
||||||
result = ResultDef} = C,
|
result = ResultDef} = C,
|
||||||
|
|
||||||
NameFmt = [" ", ?B("Command Name"), ": ", Cmd, "\n"],
|
NameFmt = [" ", ?B("Command Name"), ": ", Cmd, "\n"],
|
||||||
|
|
||||||
%% Initial indentation of result is 13 = length(" Arguments: ")
|
%% Initial indentation of result is 13 = length(" Arguments: ")
|
||||||
{ArgsDef, _, _} = ejabberd_commands:get_command_format(
|
|
||||||
C#ejabberd_commands.name, admin),
|
|
||||||
Args = [format_usage_ctype(ArgDef, 13) || ArgDef <- ArgsDef],
|
Args = [format_usage_ctype(ArgDef, 13) || ArgDef <- ArgsDef],
|
||||||
ArgsMargin = lists:duplicate(13, $\s),
|
ArgsMargin = lists:duplicate(13, $\s),
|
||||||
ArgsListFmt = case Args of
|
ArgsListFmt = case Args of
|
||||||
|
|
Loading…
Reference in New Issue