aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/config.fish.in
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-01-22 01:50:57 +1000
committerGravatar axel <axel@liljencrantz.se>2007-01-22 01:50:57 +1000
commit6ea3dd7dfe9538ca565d74e9f60de091425ac95b (patch)
treee6dac907ac8aa3c60e2cf2a69efa4c80f66a0b1d /share/config.fish.in
parent8176a1253b013828efc2007424883d50f53b0122 (diff)
Minor edit to init scripts to reduce number of non-builtins called on init
darcs-hash:20070121155057-ac50b-1fae99ef89abc7bc08dc31eb671bfc556e34202d.gz
Diffstat (limited to 'share/config.fish.in')
-rw-r--r--share/config.fish.in12
1 files changed, 5 insertions, 7 deletions
diff --git a/share/config.fish.in b/share/config.fish.in
index e0ec5c32..1071a851 100644
--- a/share/config.fish.in
+++ b/share/config.fish.in
@@ -44,18 +44,16 @@ end
#
if status --is-interactive
- set -l erase_idx
- for idx in (seq (count $PATH))
- set i $PATH[$idx]
+ set -l new_path
+ for i in $PATH
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
+ else
+ set new_path $new_path $i
end
end
- if count $erase_idx >/dev/null
- set -e PATH[(echo $erase_idx)]
- end
+ set PATH $new_path
end
#