Update ls aliases for hidden files

This commit is contained in:
Jeremy Gardais 2022-07-11 12:16:14 +02:00
parent a91388dd96
commit b38cb2d153
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 10 additions and 6 deletions

16
zshrc
View File

@ -28,22 +28,27 @@ if [ ! $(command -v exa) ]; then
## with ls {{{
alias ll='ls -l'
## Show hidden files
alias la='ls -lA'
alias llh='ls -l | head'
alias llm='ls -l | $PAGER'
alias la='ll -A'
## Show hidden only
alias lla='la --directory .*'
alias l.='ls -d .*'
alias llh='ll -l | head'
alias llm='ll -l | $PAGER'
alias llw='ls | wc -l'
## Sort by date
alias lll='ls -l -t -h -r'
alias llll='ls -l -t -h -r'
alias lld='ls -l -d */ -h'
alias l.='ls -d .*'
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
## }}}
## with exa {{{
else
alias ll='exa --color=always --long --group --git'
## Show hidden files
alias la='ll --all'
alias la='ll --all --sort .name'
## Show hidden only
alias lla='ll --list-dirs .*'
alias l.='ls -d .*'
alias llh='ll | head'
alias llm='ll | less'
alias llw='ls | wc -l'
@ -53,7 +58,6 @@ else
## Give a tree of current directory
alias llt='ll --tree'
alias lld='ll --group-directories-first'
alias l.='ls -d .*'
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
fi
## }}}