diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 2547c6a..79be629 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -29,7 +29,14 @@ alias cls='clear;ls' alias df='df -h' alias du='du -h -d 2' -if [[ $platform == 'linux' ]]; then +# eza if it is installed, plain ls otherwise. This file is shared across every machine +# and not all of them have eza, so the fallbacks stay exactly as they were. +# (eza is the maintained fork of exa; exa itself is unmaintained and out of Debian.) +if (( $+commands[eza] )); then + alias ls='eza --group-directories-first' + alias ll='eza -lah --git --group-directories-first' + alias lt='eza --tree --level=2 --group-directories-first' +elif [[ $platform == 'linux' ]]; then alias ll='ls -alh --color=auto' alias ls='ls --color=auto' elif [[ $platform == 'darwin' ]]; then