I get colored tree using tree -C but when I pipe it to less I get results like this:tree public/ -C | lessHow can I have colors in less in this case?
How can I pipe colored tree result to less or more?
less;tree;more
You want the -R switch to less.From the less man page:-R or --RAW-CONTROL-CHARS        Like -r, but only ANSI color escape sequences  are  output  in        raw form.  Unlike -r, the screen appearance is maintained correctly  in  most  cases.   ANSI  color  escape  sequences  are        sequences of the form:            ESC [ ... mSo you needtree -C public/ | less -R