Set EDITOR priority.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 03 Jan 2019 00:16:24 +0200
changeset 920 c03d7e5281ac
parent 919 cdf599c86ccf
child 921 51aac2ea3cf4
Set EDITOR priority.
.env
--- a/.env	Wed Jan 02 23:49:07 2019 +0200
+++ b/.env	Thu Jan 03 00:16:24 2019 +0200
@@ -7,7 +7,13 @@
 export DEBEMAIL='gavenkoa@gmail.com'
 
 # XXX for mc, cvs, svn, ...
-export EDITOR=et
+if command -v et >/dev/null; then
+  export EDITOR=et
+elif command -v mcedit >/dev/null; then
+  export EDITOR=mcedit
+else
+  export EDITOR=vi
+fi
 
 # XXX vim and gnome-terminal have support for 256 colours in fedora 8 at least
 # Note debian/ubuntu users should install the ncurses-term package to support this