aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-01-17 17:09:16 -0500
committerAdam Harrison <adamdharrison@gmail.com>2023-01-17 17:09:16 -0500
commitc2c049448c4357eeb8474f21e880fd7258d90d80 (patch)
tree8d127dd3951778424568ea3f117dbf5dcb6a3dab /src/lpm.lua
parentc73f371caa7c6d2591ba676afd940d53fe852e40 (diff)
downloadlite-xl-plugin-manager-c2c049448c4357eeb8474f21e880fd7258d90d80.tar.gz
lite-xl-plugin-manager-c2c049448c4357eeb8474f21e880fd7258d90d80.zip
Fixed up plugin manager plugin, moving to optimization.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index b100d43..a950e27 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1478,11 +1478,11 @@ end
local function lpm_addon_list(type, id)
local max_id = 4
- local result = { addons = { } }
+ local result = { [(type or "addon") .. "s"] = { } }
for j,addon in ipairs(common.grep(system_bottle:all_addons(), function(p) return (not type or p.type == type) and (not id or p.id:find(id)) end)) do
max_id = math.max(max_id, #addon.id)
local repo = addon.repository
- table.insert(result.addons, {
+ table.insert(result[(type or "addon") .. "s"], {
id = addon.id,
status = addon.repository and (addon:is_installed(system_bottle) and "installed" or (system_bottle.lite_xl:is_compatible(addon) and "available" or "incompatible")) or (addon:is_bundled(system_bottle) and "bundled" or (addon:is_core(system_bottle) and "core" or (addon:is_upgradable(system_bottle) and "upgradable" or "orphan"))),
version = "" .. addon.version,
@@ -1705,7 +1705,7 @@ It has the following commands:
path can be specifeid.
lpm lite-xl list Lists all installed versions of
lite-xl.
- lpm run <version> [...addons] Sets up a "bottle" to run the specified
+ lpm run <version> [...addons] Sets up a "bottle" to run the specified
lite version, with the specified addons
and then opens it.
lpm describe [bottle] Describes the bottle specified in the form