Commit 1efa0ca0 authored by Murukesh Mohanan's avatar Murukesh Mohanan

Merge branch 'master' of https://git.cse.iitb.ac.in/murukesh/home

parents 31b559a1 6a8a99d9
bindkey '^[[1;C' backward-word
bindkey '^[[1;D' forward-word
for f in /usr/local/Cellar/*/*/libexec/gnubin ~/Library/Python/*/bin
do
PATH=$f:$PATH
MANPATH=${f%/libexec/gnubin}/share/man:$MANPATH
done
pathmunge /usr/local/Cellar/*/*/libexec/gnubin ~/Library/Python/*/bin $GOPATH/bin
[[ -d $HOME/bin ]] && export PATH=$HOME/bin:$PATH
[[ -d $HOME/apps/bin ]] && export PATH="$HOME/apps/bin:$PATH"
pathmunge() {
local path_array before
# The default is to prepend the argument to PATH
before=1
case $1 in
after)
before=
;&
before)
shift
;;
esac
# Split PATH on : into an array
path_array=(${(As.:.)PATH})
# Then remove the arguments from it, since they are to be added in the
# order specified
path_array=(${path_array:|argv})
if [[ -n $before ]]
then
# Reverse the order of the arguments, so that:
# for f in ...; pathmunge f
# and
# pathmunge ...
# have the same effect.
path_array=(${(Oa)argv} $path_array)
else
path_array=($path_array $argv)
fi
# Concatenate the array back to PATH
export PATH="${(j.:.)path_array}"
}
[[ -n $GOPATH ]] && pathmunge "$GOPATH/bin"
[[ -d $HOME/bin ]] && pathmunge $HOME/bin
export EDITOR=vim
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment