This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problems with 'dircolors'

Hi, Ricardo!

`dircolors' comes with its own built-in colorization scheme; that's what
U get when U type `dircolors --print-database.'  If U want to
_customize_ your colorization scheme, dump the database to a file, like
	dircolors --print-database > dircolors.db
make whatever changes U want, and in your `.bash_profile' file (if U're
using `bash' as your shell), enter this line:
	eval $(dircolors -b /path/to/your/file/dircolors.db) 
If U're using `csh,' it changes slightly (see `dircolors --help' for
	eval $(dircolors -c /path/to/your/file/dircolors.db) 
and it has to be put into your `.tcshrc' file.

Now when U open a window, `dircolors' generates a command to set the
environment variable LS_COLORS.  This is executed in a subprocess (it's
inside a `$(...)' construct), and its output is returned as a string
passed to `eval,' which _runs_ that command (which sets the LS_COLORS
environment variable) in the context of the current process (sort of
like using `source' or `.').


					Phil the Old Coder

-----Original Message-----
From: [] On Behalf
Of Ricardo Cardoso
Sent: Wednesday, October 11, 2006 12:47 PM
Subject: Problems with 'dircolors'

Hi all,

Can someone explain me how dircolors work?
I don't understand the concept of the environment variable (in this case
- i think - LS_COLORS) and when i try 'set LS_COLORS --COLOR' it does
nothing at all.
I've tried to create a file (something.txt) with the options from '
dircolors --print-database' and then give all the values to LS_COLORS
but I get error messages like:

token is missing in line 7

and other stuff like it.



Unsubscribe info:
Problem reports:

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]