Make PATH validation only run for interactive shells to avoid infinite loop

darcs-hash:20060731003311-ac50b-da0b49830e5a9042fbe7952a63ced2c86b8978fe.gz
This commit is contained in:
axel 2006-07-31 10:33:11 +10:00
parent 8a2846ed44
commit 2fba53b113

View file

@ -25,6 +25,7 @@ set __fish_help_dir @docdir@
# Make sure there are no invalid entries in the PATH
#
if status --is-interactive
set -l erase_idx
for idx in (seq (count $PATH))
set i $PATH[$idx]
@ -37,6 +38,7 @@ end
if count $erase_idx >/dev/null
set -e PATH[(echo $erase_idx)]
end
end
#
# Add a few common directories to path, if they exists. Note that pure