top | item 27617488

(no title)

whelming_wave | 4 years 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.

discuss

order

No comments yet.