aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-01-03 13:28:40 -0500
committerAdam Harrison <adamdharrison@gmail.com>2023-01-03 13:28:40 -0500
commit0fbc4796f46bbd639ea0ba9ab6d8a80874d76cfb (patch)
treefbd6c7a2adeaa52a02731ea60c55a8c8e34d2802 /src/lpm.lua
parent98382f140508840069e6a837570c765bcf1d8a5e (diff)
downloadlite-xl-plugin-manager-0fbc4796f46bbd639ea0ba9ab6d8a80874d76cfb.tar.gz
lite-xl-plugin-manager-0fbc4796f46bbd639ea0ba9ab6d8a80874d76cfb.zip
Added more detail, and fixed id parsing.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index b131807..fcfef99 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1101,7 +1101,7 @@ function Bottle:all_plugins()
}
for i, plugin_path in ipairs(common.grep(plugin_paths, function(e) return system.stat(e) end)) do
for j, v in ipairs(system.ls(plugin_path)) do
- local id = v:gsub("%.lua$", "")
+ local id = v:gsub("%.lua$", ""):lower():gsub("[a-z0-9%-_]", "")
local path = plugin_path .. PATHSEP .. v
local matching = hash[id] and common.grep(hash[id], function(e) return not Plugin.is_plugin_different(e.local_path, path) end)[1]
if i == 2 or not hash[id] or not matching then
@@ -1422,7 +1422,7 @@ local function lpm_plugin_list(id)
if VERBOSE then
if i ~= 0 then print("---------------------------") end
print("ID: " .. plugin.id)
- print("Name: " .. plugin.name)
+ print("Name: " .. (plugin.name or plugin.id))
print("Version: " .. plugin.version)
print("Status: " .. plugin.status)
print("Author: " .. (plugin.author or ""))