Skip to content

Commit

Permalink
[zsh] Fix ls colors for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhif committed Oct 1, 2023
1 parent 034fbb2 commit fee40e2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions zsh/custom/alias.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."

# Detect which 'ls' flavor is in use
if [[ $OSTYPE == 'linux-gnu'* ]]; then
colorflag='--color'
elif [[ $OSTYPE == 'darwin'* ]]; then
colorflag="-G"
fi

# ls aliases
alias ls="ls ${colorflag}"
alias ls="ls --color"
alias ll="ls -alF"
alias la="ls -lha"
alias l="ls -CF"
Expand Down

0 comments on commit fee40e2

Please sign in to comment.