summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2021-08-27 10:38:45 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2021-08-27 10:38:45 +0100
commitc73f982aec3e438ea540b2eec6ab0ba829139f9c (patch)
treebf0294fd6b95391943a54d13b7b9c423d6c8ef8d
parentAdd mp4 function (diff)
downloadutil-c73f982aec3e438ea540b2eec6ab0ba829139f9c.tar.bz2
util-c73f982aec3e438ea540b2eec6ab0ba829139f9c.tar.xz
util-c73f982aec3e438ea540b2eec6ab0ba829139f9c.zip
Set EDITOR based on DISPLAY
-rw-r--r--bashrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/bashrc b/bashrc
index 8851b40..776bf8d 100644
--- a/bashrc
+++ b/bashrc
@@ -194,7 +194,11 @@ export HISTSIZE=${HISTFILESIZE}
export HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
export LESSCHARSET=utf-8
-export EDITOR="gvim -f"
+if [[ -n $DISPLAY ]]; then
+ export EDITOR="gvim -f"
+else
+ export EDITOR="vim"
+fi
shopt -s cdspell
shopt -s checkwinsize
shopt -s no_empty_cmd_completion