Re:Linux Terminal Goods
by awake on Thursday September 19, 2019 @08:57AM
(#21015697)
Not sure if view lets you do this but bat will switch off highlighting if you are piping output `bat file.txt | grep ...`. This makes it easy to make an alias cat=bat and have everything work. Also you can make bat display output with `less` and then line numbers can be toggled, not sure about gitgutter.
[ Parent
| on HN ]
(author of bat here)
Exactly. Drop-in compatibility with 'cat' is one of the goals of bat (see https://github.com/sharkdp/bat#project-goals-and-alternative... and a list of alternatives here: https://github.com/sharkdp/bat/blob/master/doc/alternatives....).
Another thing that I use frequently is previewing a whole set of files in a single (pager) output. Something like
bat src/*.cpp
This also allows you to easily search across a whole set of open files.