Skip to content

Commit

Permalink
Merge branch 'patch-ls-g-alias'
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Nov 2, 2016
2 parents 65f8b56 + a5d506f commit b9aaea0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/theme-and-appearance.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then
colorls -G -d . &>/dev/null && alias ls='colorls -G'
elif [[ "$OSTYPE" == darwin* ]]; then
# this is a good alias, it works by default just using $LSCOLORS
alias ls='ls -G'
ls -G . &>/dev/null && alias ls='ls -G'

# only use coreutils ls if there is a dircolors customization present ($LS_COLORS or .dircolors file)
# otherwise, gls will use the default color scheme which is ugly af
Expand All @@ -32,7 +32,7 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then
(( $+commands[dircolors] )) && eval "$(dircolors -b)"
fi

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'

# Take advantage of $LS_COLORS for completion as well.
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
Expand Down

0 comments on commit b9aaea0

Please sign in to comment.