how to view different file extension in different color ib terminal of mac leopard.

Posted by Suren on Stack Overflow See other posts from Stack Overflow or by Suren
Published on 2009-06-25T12:37:35Z Indexed on 2010/06/16 21:02 UTC
Read the original article Hit count: 229

Filed under:

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'

© Stack Overflow or respective owner

Related posts about mac