# HG changeset patch # User Kim Alvefur # Date 1594344546 -7200 # Node ID cff243aafdce0bdcc492811122f63c4507b4c023 # Parent d175de07dd73d4dd660fdd3e31320a3c9a7d5de7 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. diff -r d175de07dd73 -r cff243aafdce prosodyctl --- a/prosodyctl Fri Jul 10 03:29:02 2020 +0200 +++ b/prosodyctl Fri Jul 10 03:29:06 2020 +0200 @@ -457,7 +457,11 @@ 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