Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve ANSI escape sequences #54

Open
ncfavier opened this issue Oct 22, 2023 · 2 comments
Open

Preserve ANSI escape sequences #54

ncfavier opened this issue Oct 22, 2023 · 2 comments

Comments

@ncfavier
Copy link

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.

@konradsz
Copy link
Owner

Is it similar request to this one: BurntSushi/ripgrep#519? If so, BurntSushi's response applies here as well.

@ncfavier
Copy link
Author

ncfavier commented May 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants