Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Colored output from 'ls' (revisited)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Colored output from 'ls' (revisited)
Authored by: cubixe on Oct 31, '03 01:19:22PM
I prefer the "old" way of getting color in the terminal. The gnu ls that the fileutils package from fink installs has, IMHO, a better way of specifying colors. The gnu version lets you set colors for most (if not all) of the things panther's ls does, but with gnu ls you can also set different colors for files ending in different extensions. For example,
setenv LS_COLORS "ex=35:di=36:ln=31:*.c=32:*.cpp=32:*.cc=32:*.cxx=32:*.h=33:*.hh=33:*.m=32"
This is great for easily distinguishing source files, header files, etc. To answer a post above regarding .alias and .cshrc and .bashrc files... its really a personal preference thing. I have all my aliases in a .alias file. If you do that, you must include a line in the .cshrc file such as:
source $HOME/.alias
The .cshrc (or .bashrc for bash) file is what is sourced when the shell is executed, so to get the effects of the .alias file, you must explicitly source it. You can certainly put your aliases in .cshrc (or .bashrc), but this just keeps things modular and makes it easier to work with.

[ Reply to This | # ]