aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2018-12-19 21:34:26 +0000
committerSolderpunk <solderpunk@sdf.org>2018-12-19 21:34:26 +0000
commit8fb2a203f4f525e234096ce0bce04ce4d02dfa53 (patch)
tree4d975d43a1d0eb853f2c519b79c05771abe53e68
parentDrop bbs euid whenever it is not required, so that users don't end up in priv... (diff)
Check more environment variables for the editor to use.
-rwxr-xr-xtelem.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/telem.lua b/telem.lua
index 56379ca..29ef3f8 100755
--- a/telem.lua
+++ b/telem.lua
@@ -13,10 +13,17 @@ table = require("table")
unistd = require("posix.unistd")
_BBS_ROOT = "/var/bbs/"
-_EDITOR = os.getenv("EDITOR")
+_EDITOR = os.getenv("BBSED")
if not _EDITOR then
- _EDITOR = "/usr/bin/vim.tiny"
+ _EDITOR = os.getenv("VISUAL")
end
+if not _EDITOR then
+ _EDITOR = os.getenv("EDITOR")
+end
+if not _EDITOR then
+ _EDITOR = "nano"
+end
+
_COLOURS = {
red=31,
green=32,