From e53e4f9eb3056a80470846afbc7578a57cf3ab98 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 18 Jul 2018 19:47:20 +0800 Subject: zsh: properly alias ls on Mac --- _zsh/00-checks.zsh | 2 ++ _zsh/90-aliases.zsh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to '_zsh') diff --git a/_zsh/00-checks.zsh b/_zsh/00-checks.zsh index 6868e2c..69282a6 100644 --- a/_zsh/00-checks.zsh +++ b/_zsh/00-checks.zsh @@ -6,6 +6,8 @@ if [[ $(uname) = 'Linux' ]]; then IS_LINUX=1 +elif [[ $(uname) = 'Darwin' ]]; then + IS_MAC=1 elif [[ $(uname) = 'FreeBSD' ]]; then IS_FREEBSD=1 IS_BSD=1 diff --git a/_zsh/90-aliases.zsh b/_zsh/90-aliases.zsh index e8f354d..dc29be0 100644 --- a/_zsh/90-aliases.zsh +++ b/_zsh/90-aliases.zsh @@ -14,7 +14,7 @@ alias pu=pushd if [[ -n "${IS_LINUX}" ]]; then alias ls='ls --color=auto' -elif [[ -n "${IS_BSD}" ]]; then +elif [[ -n "${IS_BSD}" ]] || [[ -n "${IS_MAC}" ]]; then alias ls='ls -G' fi alias l='ls -lah' -- cgit v1.2.2