chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fece594
)
bash_profile: Find a useful editor automatically.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 16 Mar 2006 11:08:56 +0000
(11:08 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 16 Mar 2006 11:11:48 +0000
(11:11 +0000)
bash_profile
patch
|
blob
|
blame
|
history
diff --git
a/bash_profile
b/bash_profile
index 64a85f1e384898273a33a37dbb51ce17991b88f1..50d554272ec933740f075ecbd30bebdc56f4c60c 100644
(file)
--- a/
bash_profile
+++ b/
bash_profile
@@
-101,7
+101,16
@@
umask 002
unset LANG
unset LANG
-export EDITOR="emacs -nw"; export VISUAL="$EDITOR"
+export EDITOR=ed
+for ed in "emacs21 -nw" "emacs -nw" vi pico nano ae; do
+ name=`echo $ed | sed 's/ .*$//'`
+ if type -t >/dev/null "$name"; then
+ EDITOR=$ed
+ break
+ fi
+done
+export VISUAL="$EDITOR"
+
export TEXINPUTS=".:$HOME/lib/tex//:"
__mdw_addto INFOPATH r $HOME/info /usr/info /usr/share/info /usr/local/info
export TEXINPUTS=".:$HOME/lib/tex//:"
__mdw_addto INFOPATH r $HOME/info /usr/info /usr/share/info /usr/local/info