Only add directories to PATH that are already in PATH
This commit is contained in:
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…
Reference in New Issue
Block a user