Add alias for exa if available.
This commit is contained in:
parent
e868145d18
commit
c23f461a82
15
zshrc
15
zshrc
|
@ -24,9 +24,10 @@ alias mv='mv --interactive'
|
||||||
alias rm='rm --interactive'
|
alias rm='rm --interactive'
|
||||||
|
|
||||||
# Raccourcis pour 'ls'
|
# Raccourcis pour 'ls'
|
||||||
|
if [ ! $(command -v exa) ]; then
|
||||||
alias ll='ls -l'
|
alias ll='ls -l'
|
||||||
alias la='ls -lA'
|
alias la='ls -lA'
|
||||||
alias llm='ls -l | most'
|
alias llm='ls -l | $PAGER'
|
||||||
alias lll='ls -l | less'
|
alias lll='ls -l | less'
|
||||||
alias llv='ls -l | vimmanpager'
|
alias llv='ls -l | vimmanpager'
|
||||||
##Classer par date
|
##Classer par date
|
||||||
|
@ -34,6 +35,18 @@ alias llt='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/-/|/'\'''
|
||||||
|
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)
|
# 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
|
# `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