Open ncfavier opened 1 year ago
Is it similar request to this one: https://github.com/BurntSushi/ripgrep/issues/519? If so, BurntSushi's response applies here as well.
No, ripgrep has the correct behaviour:
$ printf '\e[0;34mfoo\n' > foo
$ rg . foo # shows "foo" in blue
$ ig . foo # shows "[0;34mfoo"
That issue is about ignoring escape codes in search, i.e. interpreting those sequences and excluding them from the text. I am asking to leave the sequences alone so that they can be interpreted by my terminal.
It would be nice to have an option to preserve ANSI escape sequences in the main view, similar to
less
's-r
or-R
flags. Currently it seems like the ESC characters are stripped, leaving only things like[94m[33m
.