summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Amago <mamago@gmail.com>2016-08-10 18:20:31 +0100
committerManuel Amago <mamago@gmail.com>2016-08-10 18:20:31 +0100
commita58e411209b9e84d5f80835e4cd575f38825dccb (patch)
tree7e9a55132240064de14ed8ac4cb1ed1a2b26e0dc
parent04770be267d79757426ace930b563e94210a35dc (diff)
downloaddotfiles-a58e411209b9e84d5f80835e4cd575f38825dccb.tar.gz
dotfiles-a58e411209b9e84d5f80835e4cd575f38825dccb.zip
Only alias GNU command when available
-rw-r--r--dot-profile6
1 files 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'