Add ls + wc -l alias
This commit is contained in:
parent
26b770959d
commit
a514868fbc
6
zshrc
6
zshrc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue