-
Notifications
You must be signed in to change notification settings - Fork 55
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
wrong behaviour with single digit keywords #10
Comments
Thanks for reporting this. I will dig into this. The underlying echo abc | ack --flush --passthru --color --color-match=red a | ack --flush --passthru --color --color-match=yellow b |
Interesting. The bug is not with This works fine echo abc | h a b c This doesn't: echo 123 | h 1 2 3 The reason for this is that, since I think this is more a technical limit of |
You can see it with plain ack as well.
The ANSI color codes are being rewritten by the subsequent calls to ack. Here's a single call. Notice the additional numbers that are added for the ANSI escape sequences.
This would probably need to be fixed in ack by adding support for multiple search patterns and color-match values in a single execution. |
Due to issues like this one, problems with overlapping matches, and - given the constraints of bash scripts - a lack of prospect of these issues being fixed at all in hhighlighter, I decided to create my own multi-color grep tool, and I am making it available to everyone who's interested: https://github.com/EugenDueck/colorexp |
$ echo 123 | h 1 2 3
31m132m23
tmux version 1.9.6
zsh version zsh 5.0.7 (x86_64-pc-linux-gnu)
The text was updated successfully, but these errors were encountered: