mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Minor edit to init scripts to reduce number of non-builtins called on init
darcs-hash:20070121155057-ac50b-1fae99ef89abc7bc08dc31eb671bfc556e34202d.gz
This commit is contained in:
parent
8176a1253b
commit
6ea3dd7dfe
@ -44,18 +44,16 @@ end
|
|||||||
#
|
#
|
||||||
|
|
||||||
if status --is-interactive
|
if status --is-interactive
|
||||||
set -l erase_idx
|
set -l new_path
|
||||||
for idx in (seq (count $PATH))
|
for i in $PATH
|
||||||
set i $PATH[$idx]
|
|
||||||
if not test -d $i
|
if not test -d $i
|
||||||
set erase_idx $erase_idx $idx
|
|
||||||
printf (_ '%s: Warning: The directory %s has been removed from your PATH because it does not exist\n') fish $i
|
printf (_ '%s: Warning: The directory %s has been removed from your PATH because it does not exist\n') fish $i
|
||||||
|
else
|
||||||
|
set new_path $new_path $i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if count $erase_idx >/dev/null
|
set PATH $new_path
|
||||||
set -e PATH[(echo $erase_idx)]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user