aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-04-22 11:59:01 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-04-22 11:59:01 -0400
commit5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5 (patch)
treef0b732411dc5da39213d95d708997cb730cc5928
parent2cdc4e761fe525db14e7b80ee7976a6142c24a49 (diff)
downloadlite-xl-plugin-manager-5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5.tar.gz
lite-xl-plugin-manager-5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5.zip
Modified `run` so that it will use the system version if you do not specify one.
-rw-r--r--CHANGELOG.md5
-rw-r--r--src/lpm.lua8
2 files changed, 11 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a5f819..0ab4b61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 1.0.2 (forthcoming)
+
+* Suppresses the progress bar by default if we're not on a TTY.
+* Added `url` as a field to `SPEC.md`.
+* Modified `run` so that it'll use the system version if you don't specify one.
# 1.0.1
diff --git a/src/lpm.lua b/src/lpm.lua
index 9a41848..9e37dfb 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1530,10 +1530,14 @@ local function lpm_lite_xl_list()
end
local function lpm_lite_xl_run(version, ...)
- if not version then error("requires a version") end
+ if not version then error("requires a version or arguments") end
+ local arguments = { ... }
+ if not version:find("^%d+") and version ~= "system" then
+ table.insert(arguments, 1, version)
+ version = "system"
+ end
local lite_xl = get_lite_xl(version) or error("can't find lite-xl version " .. version)
local addons = {}
- local arguments = { ... }
local i = 1
while i <= #arguments do
if arguments[i] == "--" then break end