[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls --color in Windows 2000

From: Richard Dawe
Subject: Re: ls --color in Windows 2000
Date: Thu, 23 Jan 2003 09:08:02 +0000


Justin Randall wrote:
> my question for you is how do you set up the LS_COLORS variable
> on a windows machine?  I've tried using the dircolors utility
> to set the environment variable but that seems to have no affect.

dircolors doesn't actually set the environment variables. It prints out
commands you should run, to set the environment variables. Unfortunately it
does not output commands that will work on Windows.

This is what dircolors outputs on my Linux box:

iolanthe:~ =] dircolors
export LS_COLORS

The set command in a Command Prompt on Windows would be:


Unfortunately when I run this under Windows '98 SE's Command Prompt (MS-DOS
7.1), I get a syntax error. It seems any value with an equals in fails. E.g.:

C:\WINDOWS>set FOO="5=4"
Syntax error

Does this work on Windows 2000?

If you don't want to type in SET LS_COLORS="..." in each Command Prompt
windows, then you can add it to the default environment. I can't remember
exactly where this in Windows 2000. I think it's in the same place on Windows
NT. I think if you go into Control Panel -> System there is a tab for
environment variables or per-user settings with a section on environment
variables. If you're Administrator, you can add this variable to everyone's
environment. If you're logged in as a normal user, you can only add it for
that user.

> Is it possible for me to obtain the source code for just the ls win32
> binary and not all of the fileutils source?

Not that I know of.


Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]