Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109070 - baselayout-darwin sets ls="ls --color" in skel/.bashrc, should be ls="ls -G"
Summary: baselayout-darwin sets ls="ls --color" in skel/.bashrc, should be ls="ls -G"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo for Mac OS X
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-12 16:42 UTC by Kito (RETIRED)
Modified: 2007-01-04 03:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kito (RETIRED) gentoo-dev 2005-10-12 16:42:15 UTC
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 ...]
Comment 1 Fabian Groffen gentoo-dev 2005-10-13 08:51:11 UTC
is this solveable at all, or is this just a reminder for lateron in the process?
Comment 2 Joe Jezak (RETIRED) gentoo-dev 2005-10-14 08:23:04 UTC
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.
Comment 3 Fabian Groffen gentoo-dev 2005-10-14 08:49:49 UTC
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 ;)
Comment 4 Nick Dimiduk (RETIRED) gentoo-dev 2006-01-05 08:08:54 UTC
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.
Comment 5 Kito (RETIRED) gentoo-dev 2006-01-05 08:42:17 UTC
`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.
Comment 6 Nick Dimiduk (RETIRED) gentoo-dev 2006-01-05 09:27:02 UTC
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.
Comment 7 Fabian Groffen gentoo-dev 2006-01-05 09:56:57 UTC
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.
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-01-04 03:45:29 UTC
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 :)