Highlight matching regex pattern in pager, via option color-pager-regex#1249
Closed
psprint wants to merge 1 commit intojonas:masterfrom
Closed
Highlight matching regex pattern in pager, via option color-pager-regex#1249psprint wants to merge 1 commit intojonas:masterfrom
psprint wants to merge 1 commit intojonas:masterfrom
Conversation
…gex` Any line matching the regex will be drawn in a new color ↔ `color-match`. Useful to make compiler warnings easy visible.
Contributor
Author
|
Hi, |
Collaborator
|
Once again you reinvent the wheel, Tig already has a coloring engine that can be extended to support regular expressions... Look for the updated syntax in the commit message or in tigrc.5.adoc. |
Contributor
Author
vxsl
pushed a commit
to vxsl/tig
that referenced
this pull request
Mar 18, 2026
When defining colors, strings of the form "/.../" will be interpreted as regular expressions. E.g. color "/([^:]+):([0-9]+):(|([0-9]+):)[ \t]+(note|warning|error): (.*)(\[-W([a-zA-Z0-8_-]+)\]|)/" yellow default bold Closes jonas#1249 Suggested-by: Sebastian Gniazdowski <sgniazdowski@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A third attempt after #1223 to commit flexible pager view output highlighter.
Any line matching the regex given by option
color_pager_regexwill be drawn in a new color ↔color-match. The option is empty by default, as requested. The color is magenta by default.Example:

Typically useful to make compiler warnings easy visible.