bat icon indicating copy to clipboard operation
bat copied to clipboard

[Feature request] --highlight-line to support regex match

Open a-b opened this issue 2 years ago • 2 comments

It would be a great help to distinguish specific areas of the printed document by passing --highlight-line 'pattern' . This is extremely useful for troubleshooting. We could use underlining or bold for the matched pattern.

a-b avatar Feb 27 '23 05:02 a-b

looking for similar thing. less -p <regex> highlights the pattern on opening the file, any plan for this feature?

Kyle0923 avatar Mar 12 '24 04:03 Kyle0923

I was able to come up with this cmd that highlights the Regex match by relying on the pattern match functionality from less

bat --paging=always --pager 'less -R -p PATTERN'

Kyle0923 avatar Mar 15 '24 02:03 Kyle0923