Something that has always bothered me is that my beautiful, colorful
ls command output is converted to stark, monochrome text whenever I pipe it to less. Syntax highlighting is extremely helpful when it comes to differentiating directories from normal, extension-less files.
Through a couple sessions of research and stumbling upon a helpful switch in the
ls man page, I've come up with this embarrassingly simple command:
ls --color=always | less -R
That's it. Using
ls forces it to send color escape sequences to
less to pass them on to your terminal, which renders them in a glorious rainbow of your choosing.
I am immediately adding this to my RC file as default arguments, although you may want to be careful. This could potentially mess up scripts dependent on parsing raw