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 {{{ # ls shortcut {{{
if [ ! $(command -v exa) ]; then if [ ! $(command -v exa) ]; then
## with ls {{{
alias ll='ls -l' alias ll='ls -l'
## Show hidden files ## Show hidden files
alias la='ls -lA' alias la='ls -lA'
alias llh='ls -l | head' alias llh='ls -l | head'
alias llm='ls -l | $PAGER' alias llm='ls -l | $PAGER'
alias llw='ls | wc -l'
## Sort by date ## Sort by date
alias lll='ls -l -t -h -r' alias lll='ls -l -t -h -r'
alias llll='ls -l -t -h -r' alias llll='ls -l -t -h -r'
alias lld='ls -l -d */ -h' alias lld='ls -l -d */ -h'
alias l.='ls -d .*' alias l.='ls -d .*'
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\''' alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
## }}}
## with exa {{{
else else
alias ll='exa --color=always --long --group --git' alias ll='exa --color=always --long --group --git'
## Show hidden files ## Show hidden files
alias la='ll --all' alias la='ll --all'
alias llh='ll | head' alias llh='ll | head'
alias llm='ll | less' alias llm='ll | less'
alias llw='ls | wc -l'
## Sort by date ## Sort by date
alias lll='ll --sort=modified' alias lll='ll --sort=modified'
alias llll='ll --sort=modified' alias llll='ll --sort=modified'
@ -51,6 +56,7 @@ else
alias l.='ls -d .*' alias l.='ls -d .*'
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\''' alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
fi fi
## }}}
# }}} # }}}
# cat with number on output lines # cat with number on output lines