Reset garbled terminal window on OS X

Posted by Orville Bennett on February 17, 2018
Read time: less than 1 minute

I use the ruby program rak to recursively search directories for a text pattern. Occassionally when rak is done returning results it will scramble the terminal output into unreadable garbage.

The solution for this on OS X is to issue the following command:

tput rmacs

Found this solution somewhere else initially, but now I’ve found it again at stackoverflow.