You are not logged in.

#1 2009-03-01 06:37:52

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

[SOLVED] ls --color with dircolors

I am going through and adding some file types .c .cc .h .hh to the dircolors database. It makes dev folders look much more organised, well to me anyway. I also wanted to color certain files such as Makefile and SConstruct which don't have an extension but are always named the same. Unfortunately I don't seem to be able to do this. This appearsto be a limitation of ls. sad Does anyone know a way to do this or would the only way be to patch ls or wrap it in a bash/python script to supply my required functionality. Perhaps wrapping it would be the easiest solution?

Last edited by mikesd (2009-03-01 06:54:47)

Offline

#2 2009-03-01 06:54:28

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] ls --color with dircolors

Ahhh. It is possible. To highlight say Makefile just put *Makefile 01;32 into your dircolors database. Shame that the default database doesn't use that feature. Didn't even know it was there.

Offline

Board footer

Powered by FluxBB