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

15
zshrc
View File

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