diff options
author | Robby Russell <robby@planetargon.com> | 2015-09-19 08:46:13 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2015-09-19 08:46:13 -0700 |
commit | 5e45c16701f35cee3764bde8faf2427ecff0d026 (patch) | |
tree | efbb40161e86c024b686c6c401d049292d1b3494 /lib | |
parent | cc53e4cb9945dca873a5f62647db1b29973c6e34 (diff) | |
parent | f516b7c7f5e630ab04d31e5f7da5f443b21f173f (diff) | |
download | zsh-5e45c16701f35cee3764bde8faf2427ecff0d026.tar.gz zsh-5e45c16701f35cee3764bde8faf2427ecff0d026.tar.bz2 zsh-5e45c16701f35cee3764bde8faf2427ecff0d026.zip |
Merge pull request #2751 from drm00/fix-openbsd-colorls
add check for colored ls on openbsd. (retry of #2225)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/theme-and-appearance.zsh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 926303ca4..ebb11fb31 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -11,8 +11,11 @@ then # otherwise, leave ls as is, because NetBSD's ls doesn't support -G gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty' elif [[ "$(uname -s)" == "OpenBSD" ]]; then - # On OpenBSD, test if "colorls" is installed (this one supports colors); - # otherwise, leave ls as is, because OpenBSD's ls doesn't support -G + # 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 2>&1 && alias ls='gls --color=tty' colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G' else ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G' |