zshrc: add ~/.gem/.../bin to PATH
This commit is contained in:
parent
dee6164c8c
commit
189246e10a
11
conf/zshrc
11
conf/zshrc
@ -7,17 +7,22 @@ fpath=(~/.zfuncs $fpath)
|
||||
|
||||
# $MYPREFIX {{{1
|
||||
|
||||
add_myprefix_to() {
|
||||
add_to() {
|
||||
if [[ `eval echo \$\{\+$1\}` == 1 ]]; then
|
||||
export $1=$MYPREFIX/$2:`eval echo \$\{$1\}`
|
||||
export $1=$2:`eval echo \$\{$1\}`
|
||||
else
|
||||
export $1=$MYPREFIX/$2
|
||||
export $1=$2
|
||||
fi
|
||||
}
|
||||
|
||||
add_myprefix_to() {
|
||||
add_to "$1" "$MYPREFIX/$2"
|
||||
}
|
||||
|
||||
MYPREFIX=~/build/myprefix
|
||||
add_myprefix_to PATH bin
|
||||
add_myprefix_to PATH sbin
|
||||
add_to PATH ~/.gem/ruby/1.8/bin
|
||||
add_myprefix_to LD_LIBRARY_PATH lib
|
||||
add_myprefix_to LD_LIBRARY_PATH lib64
|
||||
add_myprefix_to MANPATH man
|
||||
|
Loading…
Reference in New Issue
Block a user