Process ansi codes in shell output