aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-07-18 19:47:20 +0800
committerAaron LI <aly@aaronly.me>2018-07-18 19:52:36 +0800
commite53e4f9eb3056a80470846afbc7578a57cf3ab98 (patch)
treef6177c89854f6ee842643b031de775fc63b01ba7
parent4c9f9abe23b1610d78a4af9ec59714ceab3e0d74 (diff)
downloaddotfiles-e53e4f9eb3056a80470846afbc7578a57cf3ab98.tar.bz2
zsh: properly alias ls on Mac
-rw-r--r--_zsh/00-checks.zsh2
-rw-r--r--_zsh/90-aliases.zsh2
2 files changed, 3 insertions, 1 deletions
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'