When I want color in Ubuntu I do
alias ls='ls --color=always'
but on OSX this gives an error
ls: illegal option -- - and I need to do
alias ls ='ls -G'
How can I create an alias with the same code and have it work on both systems?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community