Hacker News new | ask | show | jobs
by whelming_wave 1817 days ago
`tput sgr0` reads terminfo to find out how to issue a command which resets all currently set colors, text properties, and so on, then resets them. A lot of people will do something like `echo -e '\E[32;46m'`, but that's arguably more opaque and definitely not portable across terminals.

tput is a neat command that I wish got used more! I also use `tput cnorm` to ensure the cursor is visible.