aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMatt Singleton <matt@xcolour.net>2022-12-01 15:07:28 -0600
committerMatt Singleton <matt@xcolour.net>2022-12-01 15:07:28 -0600
commit9717093d86f1906234c77230f9e167b878265cb9 (patch)
tree3be51a51991cac0e3904c098c22f28f575071b30 /config
parente8f79e5a8b7c076b6aed925279a1ebb01bcc20e8 (diff)
better detection for gnu coreutils
Diffstat (limited to 'config')
-rw-r--r--config/zsh/20-appearance.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/zsh/20-appearance.zsh b/config/zsh/20-appearance.zsh
index be5d436..4f7c8d9 100644
--- a/config/zsh/20-appearance.zsh
+++ b/config/zsh/20-appearance.zsh
@@ -1,13 +1,16 @@
#
# colorize shell programs
-if ls --color -d . &>/dev/null 2>&1; then
+if ls -Z . &>/dev/null 2>&1; then
+ # gnu coreutils?
alias ls='ls --color=auto'
eval `dircolors ${XDG_CONFIG_HOME:-${HOME}/.config}/dircolors.conf`
elif (( $+commands[gls] )); then
+ # prefixed gnu coreutils?
alias ls='gls --color=auto'
eval `gdircolors ${XDG_CONFIG_HOME:-${HOME}/.config}/dircolors.conf`
else
+ # assume bsd ls
alias ls='ls -G'
export LSCOLORS="exgxbxdxcxegedxbxgxcxd"
fi