zsh: use eza for ls/ll, add lt tree alias
exa is unmaintained and out of Debian entirely; eza is the maintained fork. Guarded on eza being installed so machines without it keep the old ls fallbacks, which are untouched.
This commit is contained in:
+8
-1
@@ -29,7 +29,14 @@ alias cls='clear;ls'
|
|||||||
alias df='df -h'
|
alias df='df -h'
|
||||||
alias du='du -h -d 2'
|
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 ll='ls -alh --color=auto'
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
elif [[ $platform == 'darwin' ]]; then
|
elif [[ $platform == 'darwin' ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user