diff options
author | Peter Palfrader <peter@palfrader.org> | 2009-05-08 18:55:34 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2009-05-08 18:55:34 +0000 |
commit | 5cc06ca537a2f1f9373bfc91dccea38775ac4575 (patch) | |
tree | 51c71d8e071e6039bb7c97d442ce60aac8aee3f4 /zshrc | |
parent | 8c03db017327484cc109990d717af4f5408154cc (diff) |
Change path setup
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@387 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 61 |
1 files changed, 35 insertions, 26 deletions
@@ -205,36 +205,45 @@ fi -PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:$PATH" -if [ -d /sw/bin ] ; then - PATH="/sw/bin:${PATH}" -fi -if [ -d $HOME/bin ] ; then - PATH="${HOME}/bin:${PATH}" -fi -if [ -d $HOME/local/bin ] ; then - PATH="${HOME}/local/bin:${PATH}" -fi -if [ -d $HOME/local/amd64/bin ] && [ "$ARCH" = "x86_64" ] ; then - PATH="${HOME}/local/amd64/bin:${PATH}" -fi -if [ -d $HOME/local/i386/bin ] && [ "$ARCH" = "i386" ] ; then - PATH="${HOME}/local/i386/bin:${PATH}" -fi -if [ -d /usr/lib/ccache ] ; then - PATH="/usr/lib/ccache:${PATH}" -elif [ -d /usr/lib/compilercache ] ; then - PATH="/usr/lib/compilercache:${PATH}" -fi +# SETUP PATH +############ +path=( + "$HOME/bin" + "$HOME/local/bin" + /usr/lib/ccache + /usr/local/bin + /usr/bin + /bin + /usr/bin/X11 + /usr/games + /sw/bin + "$path[@]" +) if [ "`id -u`" = "0" ] || ! [ -x /usr/bin/id ] ; then PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH}" + path=( + /usr/local/sbin + /usr/sbin + /sbin + "$path[@]" + ) fi -typeset -U PATH +export PATH +# Only unique entries please. +typeset -U path +# Remove entries that don't exist on this system. Just for sanity's +# sake more than anything. +path=( ${^path}(N-/) ) + + + +#MANPATH="/usr/share/man:/usr/local/share/man:/usr/local/man:$MANPATH" +#if [ -d $HOME/local/share/man ] ; then +# MANPATH="${HOME}/local/share/man:${MANPATH}" +#fi + + -MANPATH="/usr/share/man:/usr/local/share/man:/usr/local/man:$MANPATH" -if [ -d $HOME/local/share/man ] ; then - MANPATH="${HOME}/local/share/man:${MANPATH}" -fi # we want colorful listings zmodload -i zsh/complist |