nice mod to sort the files / dirs by name before dumping them.
[feisty_meow.git] / customizing / fred / fred_variables.sh
index feb32584f06a70c39a5c0ceb59e05bed1ecfe6dc..5ca2c3382bc405e775267dfef852d32342572413 100644 (file)
@@ -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.