tags:

views:

260

answers:

3

Hi,

I am trying to get colored listing of directories and files as per their extension after ls command. Recently I switched over to mac leopard from Linux. There is no .bashrc file in my home directory, so I created one with the following contents.This is doing only a bit what I want (only directories as colored). I also want to view files with different extension in different colors. What and where to add? thanx in advance :)

# Define how Bash prompt looks like:
#
# User @ Host - working dir
#export PS1='\u@\h\w$ '
export PS1='\u@\h\w: '

# Cli Colors
export CLICOLOR=1
# use blue for dir’s
export LSCOLORS=exfxcxdxbxegedabagacad

# Alias
#
#
alias ls='ls -al'
A: 

ls -Gal (-G does the color)

Kai
A: 

kai1968: the above does not allow the user to configure different colours for different extensions (e.g. tar, tgz) as far as I can tell. I would also like to know how to do this.

Niel
A: 

You need to replace your UNIX core utilities. See this tutorial:

http://cognisantcow.com/2009/11/15/improving-the-terminal-in-mac-os-x/

Nate