diff options
author | Kevin Ballard <kevin@sb.org> | 2016-02-26 20:26:24 -0800 |
---|---|---|
committer | Kevin Ballard <kevin@sb.org> | 2016-02-26 20:26:24 -0800 |
commit | 2bb7c587f400e90a06133b27f04e1ae2f6b2ca4c (patch) | |
tree | 0a521ec8c6a7c9e3e7726d485d29ae68558a4819 /share/config.fish | |
parent | 2187c0a84bdc05eb706971669534c83dc17cc762 (diff) |
Skip over /etc/paths.d entries that don't exist
I had an old /etc/paths.d/TeX file that listed a path /usr/texbin that
doesn't exist anymore. This was causing the `set PATH` to print a
warning.
Diffstat (limited to 'share/config.fish')
-rw-r--r-- | share/config.fish | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/share/config.fish b/share/config.fish index d92e04d7..755cc23e 100644 --- a/share/config.fish +++ b/share/config.fish @@ -85,9 +85,11 @@ function __fish_load_path_helper_paths # Since we are prepending but want to preserve the order of the input file, we reverse the array, append, and then reverse it again set __fish_tmp_path $__fish_tmp_path[-1..1] while read -l new_path_comp - set -l where (contains -i $new_path_comp $__fish_tmp_path) - and set -e __fish_tmp_path[$where] - set __fish_tmp_path $new_path_comp $__fish_tmp_path + if test -d $new_path_comp + set -l where (contains -i $new_path_comp $__fish_tmp_path) + and set -e __fish_tmp_path[$where] + set __fish_tmp_path $new_path_comp $__fish_tmp_path + end end set __fish_tmp_path $__fish_tmp_path[-1..1] end |