Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for preprocessing or pretty printing #2191

Open
salva opened this issue May 11, 2022 · 2 comments
Open

Allow for preprocessing or pretty printing #2191

salva opened this issue May 11, 2022 · 2 comments
Labels
feature-request New feature or request

Comments

@salva
Copy link

salva commented May 11, 2022

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 salva added the feature-request New feature or request label May 11, 2022
@sharkdp
Copy link
Owner

sharkdp commented May 30, 2022

Potential solution: #2203

@eth-p
Copy link
Collaborator

eth-p commented Feb 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants