From 8fb2a203f4f525e234096ce0bce04ce4d02dfa53 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Wed, 19 Dec 2018 21:34:26 +0000 Subject: Check more environment variables for the editor to use. --- telem.lua | 11 +++++++++-- 1 file 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, -- cgit v1.2.3