Add alias for exa if available.

This commit is contained in:
Jeremy Gardais 2017-08-04 16:37:24 +02:00
parent e868145d18
commit c23f461a82
1 changed files with 23 additions and 10 deletions

33
zshrc
View File

@ -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