Adds ls allieases for exa

This commit is contained in:
Alicia Sykes 2021-03-12 23:36:31 +00:00
parent 6375ca1873
commit 0a00b47cee

View File

@ -1,17 +1,23 @@
# Advanced Aliases.
# Use with caution
#
# ls, the common ones I use a lot shortened for rapid fire usage
alias l='ls -lFh' #size,show type,human readable
alias la='ls -lAFh' #long list,show almost all,show type,human readable
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
alias ll='ls -l' #long list
alias ldot='ls -ld .*'
alias lS='ls -1FSsh'
alias lart='ls -1Fcart'
alias lrt='ls -1Fcrt'
# Checks if a given command is availible
command_exists () {
type "$1" &> /dev/null ;
}
# Use exa package (if installed) for better ls
if command_exists exa ; then
alias ls='exa'
alias la='exa -a --icons'
alias tree='f() { exa -a --tree -L=${1:-2} --icons };f'
alias recent='exa -lahr --color-scale --icons --git --git-ignore -s=modified'
else
alias la='ls -a'
fi
alias l='ls' # List files, will use exa if availible
alias ll='ls -laFh' # List all files, with details, type indicators and headings
alias zshrc='${=EDITOR} ${ZDOTDIR:-$HOME}/.zshrc' # Quick access to the .zshrc file