mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Support /etc/paths and /etc/paths.d/* on OS X
https://github.com/fish-shell/fish-shell/issues/417
This commit is contained in:
parent
9f8fe3d5e3
commit
d99c2cb9a7
1 changed files with 13 additions and 0 deletions
|
@ -79,6 +79,19 @@ function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" -
|
||||||
end
|
end
|
||||||
__fish_reconstruct_path
|
__fish_reconstruct_path
|
||||||
|
|
||||||
|
# OS X-ism: Load the path files out of /etc/paths and /etc/paths.d/*
|
||||||
|
function __fish_load_path_helper_paths
|
||||||
|
while read -l new_path_comp
|
||||||
|
if not contains $new_path_comp $PATH
|
||||||
|
set PATH $PATH $new_path_comp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if test -r /etc/paths ; __fish_load_path_helper_paths < /etc/paths ; end
|
||||||
|
for pathfile in /etc/paths.d/* ; __fish_load_path_helper_paths < $pathfile ; end
|
||||||
|
functions -e __fish_load_path_helper_paths
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Launch debugger on SIGTRAP
|
# Launch debugger on SIGTRAP
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue