Hacker News new | past | comments | ask | show | jobs | submit login

Most generally, it will trick any command into thinking that it's not writing to a tty ; so piping into cat will often remove colors.



Of course if you want colours, you can often force programs to use them anyway. For example, I use the alias:

  alias new='ls -lthr --color=always | tail'
Normally ls will not use colours when writing to a pipe (not a tty).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: