Fix bug that causes fish to elongate the PATH whith directories which are already there

darcs-hash:20060518125909-ac50b-9c23915bb6f51f9105e04ad71b102b386b5d43a9.gz
This commit is contained in:
axel 2006-05-18 22:59:09 +10:00
parent dbb66e1895
commit 22f3dcfd35

View File

@ -18,7 +18,8 @@ if test "$USER" = root
end
for i in $path_list
if not expr "$PATH" : "$i/*" >/dev/null
set -l regex "^$i\(\|/*\)\$"
if not printf "%s\n" $PATH|grep $regex >/dev/null
if test -d $i
set PATH $PATH $i
end