support BSD like ls and find

This commit is contained in:
Thomas Ruoff
2019-03-18 23:25:45 +01:00
parent 90c72f9bd7
commit 2bd9051a3a

View File

@@ -1,7 +1,15 @@
# Unix
alias ls='ls --color=tty'
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
ls_colorflag="--color"
else # BSD like `ls`
ls_colorflag="-G"
fi
alias ls="ls ${ls_colorflag}"
alias ll='ls -al'
alias ff='find -name'
alias ff='find . -name'
alias ln='ln -v'
alias mkdir='mkdir -p'
alias e='$EDITOR'