Template:egLsAlias
Syntax
{{egLsAlias}}
Usage
Code
{{egLsAlias}}
Result
- Define aliases for directory listing
if type -P 'eza' >'/dev/null' 2>&1; then # eza
alias ls="eza --classify --time-style='long-iso'"
alias ll='ls --git --group --header --long'
alias l='ll --all --all'
else
if ls --context >'/dev/null' 2>&1; then # GNU ls version
alias ls="ls --classify --color --time-style='long-iso'"
if type -P 'dircolors' >'/dev/null' 2>&1; then
eval "$(dircolors -b)"
fi
else # other ls versions
alias ls="ls -D '%F %T' -F -G"
fi
alias ll='ls -h -l'
alias l='ll -a'
fi
alias lr='l -R'
alias lt="l -r -s 'time'"