cleaned up export statements, should be a bit easier to deal with now

This commit is contained in:
dave 2009-01-01 14:23:36 -06:00
parent 1e7d1ae9e5
commit a1711bf65f
2 changed files with 18 additions and 16 deletions

View file

@ -1,5 +1,3 @@
for wrap in cle rlfe rlwrap ; do
if (which $wrap &> /dev/null) ; then
alias ocaml="$wrap ocaml"
fi
(which $wrap &> /dev/null) && alias ocaml="$wrap ocaml"
done

28
zshrc
View file

@ -61,11 +61,11 @@ unsetopt HIST_BEEP
unsetopt EXTENDED_HISTORY
# colors
if ( which dircolors &> /dev/null ) ; then
eval $(dircolors -b $([ -f /etc/DIR_COLORS ] && echo "/etc/DIR_COLORS"))
elif ( which gdircolors &> /dev/null ) ; then
eval $(gdircolors -b $([ -f /etc/DIR_COLORS ] && echo "/etc/DIR_COLORS"))
fi
for dircolors in gdircolors dircolors ; do
if (which $dircolors &> /dev/null) ; then
eval $($dircolors -b $([ -f /etc/DIR_COLORS ] && echo "/etc/DIR_COLORS")) && break
fi
done
# terminal fallback stuff
function fix_term
@ -107,9 +107,15 @@ function fix_terminfo_db
( which lesspipe &> /dev/null ) && eval $(lesspipe)
export LESS='-iR'
( which less &> /dev/null ) && export PAGER='less'
export PAGER
for PAGER in less more pg ; do
(which $PAGER &> /dev/null) && break
done
( which vim &> /dev/null ) && export EDITOR='vim'
export EDITOR
for EDITOR in vim elvis vile nvi vi ; do
(which $EDITOR &> /dev/null) && break
done
# aliases
alias cd..='cd ..'
@ -141,11 +147,9 @@ case `uname -s` in
alias grep='ggrep -d skip --color=auto'
fi
if (which slocate &> /dev/null) ; then
alias locate='slocate'
elif (which glocate &> /dev/null) ; then
alias locate='glocate'
fi
for locate in glocate slocate ; do
(which $locate &> /dev/null) && alias locate=$locate
done
fix_terminfo_db "/opt/csw"
;;