Created
February 16, 2021 20:30
-
-
Save steder/23c061bcc1c983513843a727707f7dd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a little slow, so we cache it so we're not running a slow | |
# find on every terminal startup: | |
if [[ -e ~/.cache/zsh_exports_gnubin ]]; then | |
gnubins=(${(ps:\n:)"$(cat ~/.cache/zsh_exports_gnubin)"}) | |
else | |
gnubins=(${(ps:\n:)"$(find /usr/local/opt -type d -follow -name gnubin -print | tee ~/.cache/zsh_exports_gnubin)"}) | |
fi | |
for bindir in $gnubins; do | |
export PATH=$bindir:$PATH; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment