Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Tweak aliases for ls, dircolors to load custom dircolors if found
Browse files Browse the repository at this point in the history
  • Loading branch information
genehack committed Apr 8, 2012
1 parent d98f924 commit d000716
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions aliases
@@ -1,11 +1,22 @@
# -*- sh -*-

if [ -e ~/.dircolors ]; then
DIRCOLORS_OPTS="$HOME/.dircolors"
fi

if [ $OS_TYPE = 'linux' ]; then
eval `dircolors -b`
alias ls='LC_ALL=C /bin/ls --color=auto --classify'
DIRCOLORS='dircolors'
LS='/bin/ls'
elif [ $OS_TYPE = 'darwin' ]; then
eval `/opt/local/bin/dircolors -b`
alias ls='LC_ALL=C /opt/local/bin/ls --color=auto --classify'
DIRCOLORS='/opt/local/bin/dircolors'
LS='/opt/local/bin/ls'
else
unset DIRCOLORS
fi

if [ -n $DIRCOLORS ]; then
eval `$DIRCOLORS $DIRCOLORS_OPTS`
alias ls='LC_ALL=C $LS --color=auto --classify'
fi

alias ack='ACK_PAGER_COLOR="less -x4SrFX" ack -a'
Expand Down

0 comments on commit d000716

Please sign in to comment.