profile: Export VISUAL, fallback on 'emw' if Emacs

master
Pierre Neidhardt 2017-05-08 21:41:47 +05:30
parent f87f371456
commit 5da6d47f5b
1 changed files with 3 additions and 0 deletions

View File

@ -164,8 +164,11 @@ for i in em emacs vim nano; do
command -v $i >/dev/null 2>&1 && export EDITOR=$i && break
done
GIT_EDITOR="$EDITOR"
VISUAL="$EDITOR"
[ "$GIT_EDITOR" = em ] && GIT_EDITOR=emc
[ "$VISUAL" = em ] && VISUAL=emw
export GIT_EDITOR
export VISUAL
################################################################################