Add alias for exa if available.
This commit is contained in:
parent
e868145d18
commit
c23f461a82
33
zshrc
33
zshrc
|
@ -24,16 +24,29 @@ alias mv='mv --interactive'
|
|||
alias rm='rm --interactive'
|
||||
|
||||
# Raccourcis pour 'ls'
|
||||
alias ll='ls -l'
|
||||
alias la='ls -lA'
|
||||
alias llm='ls -l | most'
|
||||
alias lll='ls -l | less'
|
||||
alias llv='ls -l | vimmanpager'
|
||||
##Classer par date
|
||||
alias llt='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/-/|/'\'''
|
||||
if [ ! $(command -v exa) ]; then
|
||||
alias ll='ls -l'
|
||||
alias la='ls -lA'
|
||||
alias llm='ls -l | $PAGER'
|
||||
alias lll='ls -l | less'
|
||||
alias llv='ls -l | vimmanpager'
|
||||
##Classer par date
|
||||
alias llt='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/-/|/'\'''
|
||||
else
|
||||
alias ll='exa -l --git'
|
||||
alias la='exa -la --git'
|
||||
alias llm='exa -l --git | $PAGER'
|
||||
alias lll='exa -l --git | less'
|
||||
alias llv='ls -l | vimmanpager'
|
||||
##Classer par date
|
||||
alias llt='exa -l --sort=modified --git'
|
||||
alias lld='exa -l --group-directories-first'
|
||||
alias l.='ls -d .*'
|
||||
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
|
||||
fi
|
||||
|
||||
# Faire en sorte que sudo puisse également utiliser les alias! (c'est l'espace qui fait toute la différence)
|
||||
# `man zshall` partie Aliasing: "If the text ends with a space, the next word in the shell input is treated as though it were in command position for
|
||||
|
|
Loading…
Reference in New Issue