How can I deal with the colored outputs of shell commands when inputing them with
As an example, I have a self-defined
git log command, and I would like to see it in a split window. That works well enough using
:new | read !git log-command
Unfortunately, the command outputs has some colours. And thus the result looks like
- ^[[33mac74ef4^[[m 2018-10-22 [me, N] - some text
I guess I could just use as
:substitute command to clean it up afterwards, or maybe pipe it through
But I wanted to know if there was a better way to handle it?
As a minimum, I would like to remove those
^[[m characters. But even better would be to recognise them and adapt it to color the buffer accordingly.