diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-22 14:01:17 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-22 14:01:17 -0800 |
commit | d99c2cb9a7ec4b2292616ccbd851eed10fd4328b (patch) | |
tree | ec64378709807bedfcd1013e70d69a6a8017f9af /share/config.fish | |
parent | 9f8fe3d5e37f0a7d2c6df56e42b6d9ee3b64e737 (diff) |
Support /etc/paths and /etc/paths.d/* on OS X
Diffstat (limited to 'share/config.fish')
-rw-r--r-- | share/config.fish | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/share/config.fish b/share/config.fish index 4d1d832e..553aab5d 100644 --- a/share/config.fish +++ b/share/config.fish @@ -79,6 +79,19 @@ function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" - end __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 # |