This commit renders ANSI chars in order to provide shell integrations such Kitty's opening feature that captures the output of the last command in a pager such as less. Fixes #5138