Enable ls color support

By default i like to use the Green on Black color scheme with my terminals. When i enable the theme though, ls loses somehow the ability to show files in colors. The trick to enable the feature is simple. One just has to run ls like this:

ls --color=auto

Unfortunately this won’t stick, and it’a a bit of a drag to always add the –color=auto part. To solve this, one has to create an alias to ls to point to ls –color=auto. You can do this by adding the following to ~/.bashrc

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'