X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Fvariables.sh;h=b64b167098c89726696ab05b7edb3ebeddf51ea4;hb=70de25680cc889b69c99a3e2371ab3d2793fef85;hp=7c552cbe65c3148fdf8285f72f9f9ccd60066132;hpb=f4bb3f48ffeba729acf2a15c89bf95b952b24e43;p=feisty_meow.git diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 7c552cbe..b64b1670 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -290,8 +290,8 @@ fi ############## -# pull in the custom overrides for feisty_meow scripts. this is done last, -# because we want to set everything up as expected, then let the user +# pull in the custom overrides for feisty_meow scripts. this is done almost +# last, because we want to set everything up as expected, then let the user # override individual variables and definitions. we also don't guard this # to avoid running it again, because we don't know what mix of functions and # aliases they want to define in there. @@ -306,3 +306,37 @@ for i in $FEISTY_MEOW_LOADING_DOCK/custom/*.sh; do source "$i" done +############## + +# a late breaking action is to set the editor, if we can. +# we will fallback to whatever we can find on the host. +export EDITOR +if [ ! -z "$DISPLAY" ]; then + # only try to add bluefish, a gui editor, if there is an X display for it. + if [ -z "$EDITOR" ]; then + EDITOR="$(which bluefish)" + fi +fi +if [ -z "$EDITOR" ]; then + EDITOR="$(which gvim)" + if [ ! -z "$EDITOR" ]; then + # if we found gvim, then add in the no forking flag. + EDITOR+=" --nofork" + fi +fi +if [ -z "$EDITOR" ]; then + EDITOR="$(which vim)" +fi +if [ -z "$EDITOR" ]; then + EDITOR="$(which vi)" +fi +## +# out of ideas about editors at this point. +## +# set the VISUAL variable from EDITOR if we found an editor to use. +if [ ! -z "$EDITOR" ]; then + VISUAL="$EDITOR" +fi + +############## +