]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: prefer gnu utils over osx' if installed
authorSamir Benmendil <me@rmz.io>
Thu, 5 Apr 2018 12:33:54 +0000 (13:33 +0100)
committerSamir Benmendil <me@rmz.io>
Thu, 5 Apr 2018 12:33:54 +0000 (13:33 +0100)
zshrc

diff --git a/zshrc b/zshrc
index a2b40fd784c54ced26455afde3151b4d1f614e81..ceabb0ccccc7cbc99a7e19a5aed2c6eefa7d57be 100644 (file)
--- a/zshrc
+++ b/zshrc
@@ -43,6 +43,9 @@ typeset -U path     # make path a unique array
 [[ -d ~/.local/bin ]] && path=(~/.local/bin $path)
 [[ -d ~/bin ]] && path=(~/bin $path)
 [[ -d /opt/android-sdk ]] && path=($path /opt/android-sdk/platform-tools)
+# osx gnu utils (installed via brew)
+[[ -d /usr/local/opt/coreutils/libexec/gnubin ]] && path=(/usr/local/opt/coreutils/libexec/gnubin $path)
+[[ -d /usr/local/opt/findutils/libexec/gnubin ]] && path=(/usr/local/opt/findutils/libexec/gnubin $path)
 
 # source aliases
 [[ -f $XDG_CONFIG_HOME/aliases ]] && source $XDG_CONFIG_HOME/aliases