diff options
author | Kim Alvefur <zash@zash.se> | 2020-07-10 03:29:02 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-07-10 03:29:02 +0200 |
commit | a4914feb84f2a13c0884f9e3f89cf8e636d87980 (patch) | |
tree | 209939a2e037b2fba6a8b6cd2858d1959b33c694 | |
parent | 1b0079854e9cbb15fe5763c2e110b14e46d3efd8 (diff) | |
download | prosody-a4914feb84f2a13c0884f9e3f89cf8e636d87980.tar.gz prosody-a4914feb84f2a13c0884f9e3f89cf8e636d87980.zip |
prosodyctl about: Substitute better names for some Lua modules
E.g. 'lxp' isn't that easy to guess that it's LuaExpat
-rwxr-xr-x | prosodyctl | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -441,10 +441,19 @@ function commands.about(arg) local library_versions = {}; dependencies.softreq"ssl"; dependencies.softreq"DBI"; + local friendly_names = { + DBI = "LuaDBI"; + lfs = "LuaFileSystem"; + lunbound = "luaunbound"; + lxp = "LuaExpat"; + socket = "LuaSocket"; + ssl = "LuaSec"; + }; local lunbound = dependencies.softreq"lunbound"; for name, module in pairs(package.loaded) do if type(module) == "table" and rawget(module, "_VERSION") - and name ~= "_G" and not name:match("%.") then + and name ~= "_G" and not name:match("%.") then + name = friendly_names[name] or name; if #name > longest_name then longest_name = #name; end |