Only add directories to PATH that are already in PATH

Buddy Sandidge 8 years ago
parent e39241c981
commit 26abac727b

@ -36,6 +36,9 @@ fi
function _add-path { function _add-path {
dir="$1" dir="$1"
if [[ $PATH =~ .*$dir.* ]]; then
return
fi
if [[ -d $dir ]]; then if [[ -d $dir ]]; then
PATH=$dir:$PATH PATH=$dir:$PATH
fi fi

Loading…
Cancel
Save