Open xeruf opened 2 years ago
the proof of concept of bat
plugins would likely fit this use case: https://github.com/sharkdp/bat/pull/2203
I just encountered a good use-case again, where I would like to reproduce git log -p
in fossil, viewing each commit like a separate file in bat ^^
i.e. a command that processes the input before it is displayed by bat.
I often want bat's nice filename display, ruler and line number, but can't give it the file directly. For example in #2024 I wanted to use cut, now I am building something with
python -m json.tool
to format json before displaying it inbat
with syntax highlighting. By adding the ability to process the input, one could use both nicely :)So rather than:
I could use something like:
This way I can distinguish the files.
I guess the processor should be invoked line-based, or there could be a separate
--process-lines
option.