1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # ls.zshrc: Setup ls(1)
4 # Check which ls-alike command to use
5 if (( $+commands[gls] )); then
6 cmd="gls" # GNU ls (on NetBSD, for example)
7 elif (( $+commands[colorls] )); then
8 cmd="colorls" # OpenBSD
13 if $cmd --color -d . >/dev/null 2>&1; then
14 alias ls="$cmd -F --color=tty"
15 elif $cmd -G -d . >/dev/null 2>&1; then
19 # Use LS_COLORS for completion too, when available
20 if [[ -n "$LS_COLORS" ]]; then
21 zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}