diff options
| author | Manuel Amago <mamago@gmail.com> | 2016-08-10 18:20:31 +0100 |
|---|---|---|
| committer | Manuel Amago <mamago@gmail.com> | 2016-08-10 18:20:31 +0100 |
| commit | a58e411209b9e84d5f80835e4cd575f38825dccb (patch) | |
| tree | 7e9a55132240064de14ed8ac4cb1ed1a2b26e0dc /dot-profile | |
| parent | 04770be267d79757426ace930b563e94210a35dc (diff) | |
| download | dotfiles-a58e411209b9e84d5f80835e4cd575f38825dccb.tar.gz dotfiles-a58e411209b9e84d5f80835e4cd575f38825dccb.zip | |
Only alias GNU command when available
Diffstat (limited to 'dot-profile')
| -rw-r--r-- | dot-profile | 6 |
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' |
