Reset garbled terminal window on OS X

Posted by Orville Bennett on 17 February 2018
Read time: about 1 minutes

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.