From da333cc52006dc1ea40741b894347e8dc30aa45c Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 12 Apr 2013 16:51:50 -0400 Subject: [PATCH] added a few options for EDITOR --- customizing/fred/fred_variables.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/customizing/fred/fred_variables.sh b/customizing/fred/fred_variables.sh index feb32584..5ca2c338 100644 --- a/customizing/fred/fred_variables.sh +++ b/customizing/fred/fred_variables.sh @@ -41,6 +41,15 @@ if [ -z "$NETHACKOPTIONS" ]; then # editor and other mixed settings... export EDITOR="$(which vim)" + if [ -z "$EDITOR" ]; then + EDITOR="$(which vi)" + if [ -z "$EDITOR" ]; then + EDITOR="$(which emacs)" + if [ -z "$EDITOR" ]; then + echo "Cannot find a friendly editor." + fi + fi + fi export VISUAL="$EDITOR" # the editors for revision control must wait while document is edited, # so gvim and others launched to x window are not appropriate. -- 2.34.1