diff options
author | Kim Alvefur <zash@zash.se> | 2020-07-10 03:29:06 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-07-10 03:29:06 +0200 |
commit | 947c136c95d5767f83127ee62c30f13f14aea615 (patch) | |
tree | 564d7391cd868e46f18c806ac5823b193dd4f675 | |
parent | c80ef421128f58dcfdce656c90a7d9daa918ae39 (diff) | |
download | prosody-947c136c95d5767f83127ee62c30f13f14aea615.tar.gz prosody-947c136c95d5767f83127ee62c30f13f14aea615.zip |
prosodyctl about: Strip name from lua module _VERSION
Some modules have _VERSION = "LuaModule x.y.z", so it is a bit weird
to show the name twice.
-rwxr-xr-x | prosodyctl | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -457,7 +457,11 @@ function commands.about(arg) if #name > longest_name then longest_name = #name; end - module_versions[name] = module._VERSION; + local mod_version = module._VERSION; + if tostring(mod_version):sub(1, #name+1) == name .. " " then + mod_version = mod_version:sub(#name+2); + end + module_versions[name] = mod_version; end end if lunbound then |