diff options
author | Francesco <francesco.bbt@gmail.com> | 2021-08-17 22:44:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 22:44:17 +0200 |
commit | 49d3d21c987645b448184a752043946ed90d6031 (patch) | |
tree | b187286f2ed78fa9317f288dc0c5144840bcdad9 /plugins/openfilelocation.lua | |
parent | a42a0d57b08a9080ed9fd8fa84f1269e3847980f (diff) | |
parent | 9689846686f77dc0aa1e6f4d31fbfc42998c2085 (diff) | |
download | lite-xl-plugins-49d3d21c987645b448184a752043946ed90d6031.tar.gz lite-xl-plugins-49d3d21c987645b448184a752043946ed90d6031.zip |
Merge pull request #45 from lite-xl/2.0
2.0 Merge
Diffstat (limited to 'plugins/openfilelocation.lua')
-rw-r--r-- | plugins/openfilelocation.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/openfilelocation.lua b/plugins/openfilelocation.lua index 48877bd..4b89815 100644 --- a/plugins/openfilelocation.lua +++ b/plugins/openfilelocation.lua @@ -1,15 +1,16 @@ --- mod-version:1 -- lite-xl 1.16 +-- mod-version:2 -- lite-xl 2.0 local core = require "core" local command = require "core.command" local config = require "core.config" +config.plugins.openfilelocation = {} if PLATFORM == "Windows" then - config.filemanager = "explorer" + config.plugins.openfilelocation.filemanager = "explorer" elseif PLATFORM == "Mac OS X" then - config.filemanager = "open" + config.plugins.openfilelocation.filemanager = "open" else - config.filemanager = "xdg-open" + config.plugins.openfilelocation.filemanager = "xdg-open" end @@ -23,9 +24,9 @@ command.add("core.docview", { local folder = doc.filename:match("^(.*)[/\\].*$") or "." core.log("Opening \"%s\"", folder) if PLATFORM == "Windows" then - system.exec(string.format("%s %s", config.filemanager, folder)) + system.exec(string.format("%s %s", config.plugins.openfilelocation.filemanager, folder)) else - system.exec(string.format("%s %q", config.filemanager, folder)) + system.exec(string.format("%s %q", config.plugins.openfilelocation.filemanager, folder)) end end }) |