diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-14 19:54:42 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-14 19:54:42 -0600 |
commit | a16fe1511ccf698432b7bbaccf250a7739ed2a92 (patch) | |
tree | ee5e6ed90702bf1691bd580a09c1745d898f768b /lib/theme-and-appearance.zsh | |
parent | a2baf45bce6bb8b501512233441af8f65f90a775 (diff) | |
parent | 31a84e710f2006176402be6b76ce370dabfc95d3 (diff) | |
download | zsh-a16fe1511ccf698432b7bbaccf250a7739ed2a92.tar.gz zsh-a16fe1511ccf698432b7bbaccf250a7739ed2a92.tar.bz2 zsh-a16fe1511ccf698432b7bbaccf250a7739ed2a92.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'lib/theme-and-appearance.zsh')
-rw-r--r-- | lib/theme-and-appearance.zsh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index a3bb24677..467b770d6 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -6,17 +6,19 @@ export LSCOLORS="Gxfxcxdxbxegedabagacad" if [[ "$DISABLE_LS_COLORS" != "true" ]]; then # Find the option for using colors in ls, depending on the version - if [[ "$(uname -s)" == "NetBSD" ]]; then + if [[ "$OSTYPE" == netbsd* ]]; then # On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors); # otherwise, leave ls as is, because NetBSD's ls doesn't support -G gls --color -d . &>/dev/null && alias ls='gls --color=tty' - elif [[ "$(uname -s)" == "OpenBSD" ]]; then + elif [[ "$OSTYPE" == openbsd* ]]; then # On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base, # with color and multibyte support) are available from ports. "colorls" # will be installed on purpose and can't be pulled in by installing # coreutils, so prefer it to "gls". gls --color -d . &>/dev/null && alias ls='gls --color=tty' colorls -G -d . &>/dev/null && alias ls='colorls -G' + elif [[ "$OSTYPE" == darwin* ]]; then + gls --color -d . &>/dev/null && alias ls='gls --color=tty' || alias ls='ls -G' else # For GNU ls, we use the default ls color theme. They can later be overwritten by themes. if [[ -z "$LS_COLORS" ]]; then @@ -24,6 +26,9 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then fi ls --color -d . &>/dev/null && alias ls='ls --color=tty' || alias ls='ls -G' + + # Take advantage of $LS_COLORS for completion as well. + zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" fi fi |