Skip to content

Commit

Permalink
alias: make ls alias work even without GNU ls
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Dec 27, 2012
1 parent 32dfea6 commit 59756f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rc/colors.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
[[ "$terminfo[colors]" -ge 8 ]] && {
# ls colors
export LSCOLORS="Gxfxcxdxbxegedabagacad"
ls --color -d . &>/dev/null && alias ls='ls --color=tty' || alias ls='ls -G'
ls --color -d . &>/dev/null && alias ls='ls --color=tty' || {
ls -G &> /dev/null && alias ls='ls -G'
}

# grep colors
export GREP_OPTIONS='--color=auto'
Expand Down

0 comments on commit 59756f7

Please sign in to comment.