Add unversioned brew python links to PATH

The `python` Homebrew package installs unversioned links to Python 3
executables in `/usr/local/opt/python/libexec/bin`. Add this directory
to the `PATH` environment variable when it's present.
This commit is contained in:
Kenneth Benzie 2020-01-16 23:23:15 +00:00
parent ec8675fa86
commit db124794ef

2
zshenv
View File

@ -22,6 +22,8 @@ INFOPATH=$HOME/.local/share/info:$INFOPATH
# Add ccache to the PATH and use XDG base dir paths # Add ccache to the PATH and use XDG base dir paths
if [ `uname` = Darwin ]; then if [ `uname` = Darwin ]; then
[ -d /usr/local/opt/python/libexec/bin ] && \
PATH=/usr/local/opt/python/libexec/bin:$PATH
[ -f /usr/local/bin/ccache ] && \ [ -f /usr/local/bin/ccache ] && \
PATH=/usr/local/opt/ccache/libexec:$PATH PATH=/usr/local/opt/ccache/libexec:$PATH
elif [ -f /usr/bin/ccache ]; then elif [ -f /usr/bin/ccache ]; then