bat icon indicating copy to clipboard operation
bat copied to clipboard

Allow for preprocessing or pretty printing

Open salva opened this issue 2 years ago • 2 comments

I find myself repeatedly combining bat with a pretty printer, as in: jq . file.json|bat -l JSON

IMO, it would be very handy to have the preprocessing/pretty printing integrated into bat, so that one could just run it like bat -P file.json.

(And I know about prettybat from the bat-extras repository, but still, I think having the feature natively supported would be much better)

salva avatar May 11 '22 09:05 salva

Potential solution: #2203

sharkdp avatar May 30 '22 05:05 sharkdp

Another potential solution: #2444.

Support for LESSOPEN/LESSCLOSE is not yet included in release bilds by default, but if/when it is, it would be possible to use it to run pretty printers as an input preprocessor.

eth-p avatar Feb 15 '24 22:02 eth-p