Added fallbacks.

Pascal J. Bourguignon [2021-07-29 20:02]
Added fallbacks.
Filename
ec
diff --git a/ec b/ec
index ea20dba..9b9af79 100755
--- a/ec
+++ b/ec
@@ -15,4 +15,11 @@ for ec in /Applications/Emacs.app/Contents/MacOS/bin/emacsclient emacsclient ; d
     fi
 done
 echo "No emacsclient."
-( echo "Trying $VISUAL" ; "$VISUAL" "$@" ) || ( echo "Trying $EDITOR" ; "$EDITOR" "$@" )
+if [ "$VISUAL" != "ec" ] ; then
+    echo "Trying $VISUAL"
+    "$VISUAL" "$@"
+fi || \
+    if [ "$EDITOR" != "ec" ] ; then
+        echo "Trying $EDITOR"
+        "$EDITOR" "$@"
+    fi
ViewGit