ls.bashrc: MacOS compatability

This commit is contained in:
Gregor Bückendorf 2019-05-18 15:49:13 +02:00
parent 536deb63b6
commit 34e2071988

View file

@ -1,4 +1,12 @@
alias ls="ls --color=auto"
# On BSD-based operating systems the GNU coreutils version of ls may be
# installed as gls. I prefer a consistent ls to one that actually integrates
# well with MacOS, so here we are.
if command -v gls >/dev/null 2>&1; then
alias ls="gls --color=auto"
else
alias ls="ls --color=auto"
fi
alias ll="ls --human-readable --color=auto -l"
alias la="ls --human-readable --all --color=auto -l"
alias lA="ls --human-readable --almost-all --color=auto -l"