I read that Apple, instead of jamming more and more PATH
variable variations to the end of shell profile file, created path_helper
binary so that it could expand PATH
variable automatically by reading path lists from /etc/paths.d/
directory.
Also - this file generates output only for csh and bash (-c
and -s
flags accordingly). There is no output for zsh
(although zsh being somewhat bash compatible - I understand that).
I am using zsh. I have /etc/zshenv
file which contains following lines:
# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
It takes about half a second when I open terminal or its new tab for that process to complete. There is only one file with single path (/usr/X11/bin
). How much am I risking if I remove /etc/zshenv
at all? Would it be enough to put aforementioned path to my .zshrc
or .zshenv
files?
path_helper
call? I suspect it could just bezsh
s start-up time,bash
takes a moment, too. While addingPATH
entries in the usual way should do the same job, I doubt a littlepath_helper
needs that much longer. (Easy test:setopt noglobalrcs
in~/.zshenv
)