From 8b73ae1cdc9a05407ceffb316fc185a064e024eb Mon Sep 17 00:00:00 2001 From: Jan Jastrow Date: Sat, 10 Aug 2024 22:56:58 +0200 Subject: [PATCH] Reorganize `ll` handling. eza also now preferred --- zsh/alias | 20 -------------------- zsh/env | 23 ++++++++++++++++++----- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/zsh/alias b/zsh/alias index 5d24b6b..02fbe86 100644 --- a/zsh/alias +++ b/zsh/alias @@ -2,26 +2,6 @@ # 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 if [[ -x $(which brew) ]]; then alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup' diff --git a/zsh/env b/zsh/env index 08fd718..0dfd8c7 100644 --- a/zsh/env +++ b/zsh/env @@ -11,13 +11,26 @@ export LC_TYPE=en_US.UTF-8 # set default editor export EDITOR="nano" -# set `ll` command - b(etter)ls per default +# set `ll` alias +# eza > lsd > bls alias ll=bls -if test -x "$(which eza)"; then - alias ll=eza -fi -if test -x "$(which lsd)"; then + +if [[ -x $(which lsd) ]]; then 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 #