LS colours on windows.
Brought to you by:
syring
Hi. I can't get ls to output colours on windows.
I have tried typeing
"eval dircolors", but it doesn't help.
It just displays the
following:
?[0m?[01;34mARJ?[0m
?[01;34mDivX?[0m
?[01;34mMusic?[0m
Please
tell me what I am doing wrong.
I am using Windows 2000,
service pack 3.
the ver command says"Microsoft
Windows 2000 [Version 5.00.2195]"
Thanx.
Logged In: YES
user_id=539078
Those are ANSI escape characters. You'll need an ANSI
driver to display those properly.
Playing around with it, it doesn't look possible. There are
instructions at:
http://www.winscriptingsolutions.com/Articles/Index.cfm?
ArticleID=21717
on how to enable the ANSI driver that comes with Windows,
but it only works in DOS mode, and ls will not execute in
DOS mode.
Logged In: YES
user_id=539078
Looking around, it looks like MS dropped ANSI support
altogether. It isn't supported in CMD.EXE, and the ANSI.SYS
driver is a DOS mode only beast.
FYI, ANSI codes are: (escape) (open bracket) (parameter)
(command)
Since the escape char is being displayed as a ? above, and
knowing that the "m" command is a color code whose
parameters are background;foreground (IIRC), you can
decypher some of the gibberish above.
Logged In: YES
user_id=732553
I have written an ls command for windows, however it is
incomplete. The color-coding works effectively, however
there is no permissions display. Now that I have found this
project, I may adapt some of the source to work with my
implementation of ls (simply called winls). As soon as
sf.net's cvs server allows me to, I will import my code onto
sf.net's cvs repository. Search for winls for more information.