You are not logged in.

#1 2009-04-06 11:21:55

SomeoneWithAPurpose
Member
Registered: 2009-04-02
Posts: 26

How do I make urxvt display colors on directories?

Hey, I have a question.

How do I display directories with a blue color in urxvt? I wanna be able to determine whether or not something is a directory or a file.

Thanks.

Offline

#2 2009-04-06 11:51:14

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: How do I make urxvt display colors on directories?

How about 'ls --color'?

Offline

#3 2009-04-06 12:03:29

SomeoneWithAPurpose
Member
Registered: 2009-04-02
Posts: 26

Re: How do I make urxvt display colors on directories?

Oh nice, yeah that was exactly what I was looking for.

Now how do I save that configuration so ls will always use --color?

Offline

#4 2009-04-06 12:05:53

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: How do I make urxvt display colors on directories?

If your shell is bash, then a line like "alias ls='ls --color'" in your ~/.bashrc would do.

Offline

#5 2009-04-06 12:09:05

SomeoneWithAPurpose
Member
Registered: 2009-04-02
Posts: 26

Re: How do I make urxvt display colors on directories?

With or without double quotes?

And I think i'm running bash... It says bash-3,2# at the prompt.

Offline

#6 2009-04-06 12:12:33

Wra!th
Member
Registered: 2009-03-31
Posts: 342

Re: How do I make urxvt display colors on directories?

SomeoneWithAPurpose wrote:

With or without double quotes?

And I think i'm running bash... It says bash-3,2# at the prompt.

in your ~/.bashrc add

alias ls='ls --color=auto'

MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Offline

#7 2009-04-06 12:15:18

SomeoneWithAPurpose
Member
Registered: 2009-04-02
Posts: 26

Re: How do I make urxvt display colors on directories?

Alright thanks guys.

But

alias ls="ls --color"

worked too. smile

Offline

#8 2009-04-06 12:27:54

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: How do I make urxvt display colors on directories?

Well, reading 'man ls' would tell you that there are three possibilities (pretty self explanatory):
--color=never, --color=auto, --color=always
and when you use only '--color', it's assumed that it's '--color=always' that you want.

Offline

Board footer

Powered by FluxBB