smartless
smartless copied to clipboard
when bypassing less, should still highlight matches as specified by --pattern
Would be nice to preserve the behavior of --pattern even when the output is short.
(I use --pattern in various shell aliases that run particular commands, grep their output, and highlight the grep matches.)
This is a little tricky to get right in all possible circumstances, but I've attempted a first version that supports this and you can find it here: https://github.com/stefanheule/smartless/tree/issue-3. Would you mind testing it and checking if it works for your use case? If it works, we can try and merging it back into master.