Use a new method for prepending to the PATH variable.
This commit is contained in:
parent
5b4a73f178
commit
91c4fe431c
10
.bashrc
10
.bashrc
|
@ -1,3 +1,9 @@
|
|||
pathadd() {
|
||||
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
|
||||
PATH="$1${PATH:+":$PATH"}"
|
||||
fi
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
# The best editor
|
||||
#--------------------------------------------------------------------------------
|
||||
|
@ -20,7 +26,9 @@ mkdir -p ~/src ~/tmp ~/var/log
|
|||
#--------------------------------------------------------------------------------
|
||||
# Update the path with local overrides
|
||||
#--------------------------------------------------------------------------------
|
||||
export PATH=~/bin:/usr/local/bin:/usr/local/sbin:${PATH}
|
||||
pathadd /usr/local/sbin
|
||||
pathadd /usr/local/bin
|
||||
pathadd ~/bin
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue