Website Logo. Upload to /source/logo.png ; disable in /source/_includes/logo.html

Mocking Eye

'Tis all in vain?

Piping Ls Through Less With Colors on Mac OS X

| Comments

The following command will do the trick:

CLICOLOR_FORCE=1 ls -G|less -R

Or just add this to your .bash_profile file to have ls always display in color and less always able to consume color codes:

alias ls='CLICOLOR_FORCE=1 ls -G'
alias less='less -R'

This has been tested on 10.6.8 and should be valid for subsequent versions as well. Just a tad annoying since ls on Mac OS X behaves a bit differently than the standard linux one (i.e. no --color option).