From a58e411209b9e84d5f80835e4cd575f38825dccb Mon Sep 17 00:00:00 2001 From: Manuel Amago Date: Wed, 10 Aug 2016 18:20:31 +0100 Subject: Only alias GNU command when available --- dot-profile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dot-profile b/dot-profile index 08e60cd..ae3b1ca 100644 --- a/dot-profile +++ b/dot-profile @@ -14,8 +14,10 @@ export HISTTIMEFORMAT="[%F %T] " export HISTFILE=~/.bash_eternal_history # Use MacPorts GNU commands instead of Mac BSD defaults -alias sort=/opt/local/libexec/gnubin/sort -alias ls='/opt/local/libexec/gnubin/ls --color=auto' +if [[ -f /opt/local/libexec/gnubin ]]; then + alias sort=/opt/local/libexec/gnubin/sort + alias ls='/opt/local/libexec/gnubin/ls --color=auto' +fi alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' -- cgit v1.2.1