Adding prepaths

This commit is contained in:
Hunter Haugen 2010-01-20 11:40:18 -08:00
parent 67896daee0
commit c6cd855d51

22
.zshrc
View file

@ -20,19 +20,28 @@ export LD_LIBRARY_PATH=/opt/csw/lib
#zsh's path #zsh's path
export PATH=/usr/sbin:/usr/bin:/sbin:/bin export PATH=/usr/sbin:/usr/bin:/sbin:/bin
export MANPATH=/usr/man:/usr/share/man export MANPATH=/usr/man:/usr/share/man
paths=(~/.cabal/bin /cat/bin /cat/games/bin /opt/csw/sbin /opt/csw/bin paths=(/cat/bin /cat/games/bin /opt/csw/sbin /opt/csw/bin
/pkgs/ghc/current/bin /usr/sfw/sbin /usr/sfw/bin /opt/SUNWut/sbin /pkgs/ghc/current/bin /pkgs/chromium/bin /usr/sfw/sbin /usr/sfw/bin
/opt/SUNWut/bin /usr/ccs/bin /usr/local/bin /usr/openwin/bin /opt/SUNWut/sbin /opt/SUNWut/bin /usr/ccs/bin /usr/local/bin /usr/openwin/bin
/usr/bin/X11 /usr/local/bin/X11 /usr/openwin/bin/xview /opt/java/bin /usr/bin/X11 /usr/local/bin/X11 /usr/openwin/bin/xview /opt/java/bin
/opt/java5/bin /opt/java/jre/bin /opt/openoffice/program) /opt/java5/bin /opt/java/jre/bin /opt/openoffice/program)
prepaths=(~/.cabal/bin ~/local/bin ~/local/sbin ~/local/share/bin)
for dir in $paths ; do for dir in $paths ; do
if [ -d $dir ] ; then if [ -d $dir ] ; then
export PATH=$PATH:$dir export PATH=$PATH:$dir
if [ -d `dirname $dir` ] ; then if [ -d `dirname $dir`/man ] ; then
export MANPATH=$MANPATH:`dirname $dir`/man export MANPATH=$MANPATH:`dirname $dir`/man
fi fi
fi fi
done done
for dir in $prepaths ; do
if [ -d $dir ] ; then
export PATH=$dir:$PATH
if [ -d `dirname $dir`/man ] ; then
export MANPATH=`dirname $dir`/man:$MANPATH
fi
fi
done
# Load profiles from /etc/profile.d # Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do for profile in /etc/profile.d/*.sh; do
@ -40,11 +49,6 @@ if test -d /etc/profile.d/; then
done done
unset profile unset profile
fi fi
if [ -d ~/local/bin ] ; then
export PATH=~/local/bin:~/local/sbin:$PATH
export MANPATH=~/local/man:$MANPATH
export MANPATH=~/local/share/man:$MANPATH
fi
#gem's path #gem's path
if [ -d ~/.gems/bin ] ; then if [ -d ~/.gems/bin ] ; then
export PATH="$HOME/.gems/bin:$PATH" export PATH="$HOME/.gems/bin:$PATH"