#3289·bat

Support mouse instead of relying on less as a pager

Author: craigemeryCreated May 9, 2025Updated Sep 11, 2026
Labelsfeature-requestwaiting-on-authorpager-related

The bigger deal here for me is that when we rely on telling bat to use less --raw-control-characters --mouse as a pager, it results in an imperfect experience if bat has coloured the output.

So if I bat --pager="less --raw-control-characters--mouse" test.log then bat colour syntax highlights the log file, great, but less hates the input.

Worse, I believe bat is good at letting the user search for text that bat knows is coloured and bat ignores the colour control characters, but when using less as a pager less does not ignore the control characters.

So I happen to think brining into bat mouse handing could well be the best solution. Hopefully a FOSS package can be leveraged to facilitate this?