Add ls + wc -l alias

This commit is contained in:
Jeremy Gardais 2022-03-29 18:00:16 +02:00
parent 26b770959d
commit a514868fbc
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 0 deletions

6
zshrc
View File

@ -25,23 +25,28 @@ alias rm='rm --interactive'
# ls shortcut {{{
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 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 llh='ll | head'
alias llm='ll | less'
alias llw='ls | wc -l'
## Sort by date
alias lll='ll --sort=modified'
alias llll='ll --sort=modified'
@ -51,6 +56,7 @@ else
alias l.='ls -d .*'
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
fi
## }}}
# }}}
# cat with number on output lines