Darwin ls doesn't recognize --color=auto Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: # ls ls: illegal option -- - usage: ls [-ABCFGHLPRSTWZabcdefghiklmnopqrstuwx1] [file ...]
is this solveable at all, or is this just a reminder for lateron in the process?
grobian: Well, the actual skel/.bashrc on regular linux systems comes with bash. But since this package was really for the collision protect systems, I included it here instead. We can definitely make the change if this fixes the problem. (I probably never noticed it because I overwrote my ls with the gnu one.
josejx: I misunderstood the request actually. I was under the impression ls was a shell built-in, however it is a separate program. So in that sense, ignore my comment ;)
The version of ls on darwin does not support any '--' options; these are GNU extensions, afaik. I suggest removing the alias line entirely and letting the user enable color if they so choose in their own bash init scripts. For those interested, this is done by setting the CLICOLOR and LSCOLORS environment variables as described in the man page.
`ls -G` is the equivalent of setting the CLICOLOR var. I would vote to turn it on by default to make it somewhat consistent with Gentoo linux installations.
If we're enabling colored ls output, should we also set the LSCOLORS variable to something similar to the content of DIR_COLORS? Granted, we cannot manage such a fine-grained definition as that, but we could do something.
IIRC the bash init scripts do that. Current OSX doesn't source them because you can't install gentoo-bash without overriding the system one. In the prefix you do source those files and hence is done what you propose. Same for any other shell that wants to enable this I think.
if userland is BSD then we set CLICOLOR=1, if it's GNU then we keep current behaviour, if neither then we don't do anything. Which should fix this bug :)