aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 8a3c655..f9860bd 100644
--- a/init.lua
+++ b/init.lua
@@ -34,7 +34,7 @@ M.replace_URLs = function()
-- local status, out, err = vis:pipe(vis.win.file, vis.win.selection.range, cmd)
-- but it doesn't work
local tmpfile = os.tmpname()
- local cmd = getPath(debug.getinfo(2,'S').source) .. "abbrevURL.lua >" .. tmpfile
+ local cmd = "abbrevURL >" .. tmpfile
local ahandle = io.popen(cmd, 'w')
ahandle:write(vis.win.file.lines[line])
ahandle:close()
@@ -68,7 +68,6 @@ vis:map(vis.modes.NORMAL, "gG", function()
vis.win.selection:to(my_line, my_col)
end, "Shorten URLs")
vis:operator_new("gK", function(file, range, pos)
- -- local cmd = getPath(debug.getinfo(2,'S').source) .. "abbrevURL.lua"
local cmd = "abbrevURL"
local status, out, err = vis:pipe(file, range, cmd)
if not status then