From 947c136c95d5767f83127ee62c30f13f14aea615 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 10 Jul 2020 03:29:06 +0200 Subject: 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. --- prosodyctl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'prosodyctl') diff --git a/prosodyctl b/prosodyctl index 27a44ec4..fabfe04f 100755 --- a/prosodyctl +++ b/prosodyctl @@ -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 -- cgit v1.2.3