I think this covers the rest of the functionality that needs to deal with ansi escapes. Related to #1057