From 2d65cf403b734f5a972580ee8cdb478b8664dd34 Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann Date: Tue, 13 Mar 2012 11:27:10 +0000 Subject: [PATCH] Fixing ls colours in Linux --- alias.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/alias.zsh b/alias.zsh index 38499d5d..dc3a3d79 100644 --- a/alias.zsh +++ b/alias.zsh @@ -15,7 +15,12 @@ if zstyle -t ':omz:alias:ls' color; then else export CLICOLOR=1 export LSCOLORS="exfxcxdxbxegedabagacad" - alias ls='ls -G -F' + ls --color -d . &>/dev/null 2>&1 + if [[ $? == 0 ]]; then + alias ls='ls --color=auto -F' + else + alias ls='ls -GF' + fi fi fi