diff options
Diffstat (limited to 'telem.lua')
-rwxr-xr-x | telem.lua | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -12,6 +12,10 @@ stringx = require("pl.stringx") table = require("table") _BBS_ROOT = "/var/bbs/" +_EDITOR = os.getenv("EDITOR") +if not _EDITOR then + _EDITOR = "/usr/bin/vim.tiny" +end -- Global var declarations @@ -273,7 +277,7 @@ function do_new() end -- Save body of post to temp file local filename = os.tmpname() - os.execute("$EDITOR " .. filename) + os.execute(_EDITOR .. " " .. filename) -- TODO: show and confirm -- Make thread dir local timestamp = tostring(os.time()) @@ -343,7 +347,7 @@ end function do_type_reply() local filename = os.tmpname() - os.execute("$EDITOR " .. filename) + os.execute(_EDITOR .. " " .. filename) local timestamp = tostring(os.time()) local newfilename = timestamp .. "-" .. username local newpath = path.join(current_thread.directory, newfilename) |