Mercurial > prosody-hg
changeset 14127:d666e7cd8609 13.0
mod_admin_shell: Show help listing when specifying only a section name
This is significantly better than showing 'table:0x.....'.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 16 Apr 2026 18:16:05 +0100 |
| parents | 791426dda30d |
| children | 0235fee459d0 |
| files | plugins/mod_admin_shell.lua |
| diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Thu Apr 16 16:12:34 2026 +0100 +++ b/plugins/mod_admin_shell.lua Thu Apr 16 18:16:05 2026 +0100 @@ -415,6 +415,10 @@ end end + if (source or line):match("^%w+$") and def_env[source or line] then + source, line = nil, "help:"..(source or line).."();"; + end + local chunkname = "=console"; -- luacheck: ignore 311/err local chunk, err = envload(source or ("return "..line), chunkname, env);
