Reorganize ll handling. eza also now preferred

This commit is contained in:
Jan Jastrow 2024-08-10 22:56:58 +02:00
parent 074d7abd35
commit 8b73ae1cdc
2 changed files with 18 additions and 25 deletions

View File

@ -2,26 +2,6 @@
# filename: /zsh/alias # filename: /zsh/alias
#-------------------------------- #--------------------------------
# Better LS
if [[ $platform == 'Linux' ]]; then
alias bls='pwd; ls -lahp --color=auto --group-directories-first'
elif [[ $platform == 'macOS' && -x $(which gls) ]]; then
alias bls='pwd; gls -lahpG --group-directories-first'
elif [[ $platform == 'macOS' ]]; then
alias bls='/bin/ls -lahG'
fi
# Better eza
if [[ -x $(which eza) ]]; then
alias eza='pwd; eza --long --all --all --group-directories-first --git --group'
# --all (2x) to show `.` and `..` directories as well
fi
# Better lsd
if [[ -x $(which lsd) ]]; then
alias lsd='pwd; lsd -laF --group-dirs=first --icon=never'
fi
# Update tools/OS aliases # Update tools/OS aliases
if [[ -x $(which brew) ]]; then if [[ -x $(which brew) ]]; then
alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup' alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup'

23
zsh/env
View File

@ -11,13 +11,26 @@ export LC_TYPE=en_US.UTF-8
# set default editor # set default editor
export EDITOR="nano" export EDITOR="nano"
# set `ll` command - b(etter)ls per default # set `ll` alias
# eza > lsd > bls
alias ll=bls alias ll=bls
if test -x "$(which eza)"; then
alias ll=eza if [[ -x $(which lsd) ]]; then
fi
if test -x "$(which lsd)"; then
alias ll=lsd alias ll=lsd
alias lsd='pwd; lsd -laF --group-dirs=first --icon=never'
fi
if [[ -x $(which eza) ]]; then
alias ll=eza
alias eza='pwd; eza --long --all --all --group-directories-first --git --group'
fi
## Better LS
if [[ $platform == 'Linux' ]]; then
alias bls='pwd; ls -lahp --color=auto --group-directories-first'
elif [[ $platform == 'macOS' && -x $(which gls) ]]; then
alias bls='pwd; gls -lahpG --group-directories-first'
elif [[ $platform == 'macOS' ]]; then
alias bls='/bin/ls -lahG'
fi fi
# #