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

Add way to fail silently when no specific syntax has been found #1709

Open
scop opened this issue Jun 28, 2021 · 1 comment
Open

Add way to fail silently when no specific syntax has been found #1709

scop opened this issue Jun 28, 2021 · 1 comment
Labels
feature-request New feature or request

Comments

@scop
Copy link
Contributor

scop commented Jun 28, 2021

Having ability to fail silently with no output and a non-zero exit status would be useful when configuring bat as an input preprocessor for less. This would accomplish falling back to other preprocessors in case bat doesn't have a specific output available for the given file, such as ones displaying metadata for images, archives, etc.

I implemented this to chroma some time ago, not sure how easily something like this would fit to bat but based on a quick look, it might not be entirely trivial:

@scop scop added the feature-request New feature or request label Jun 28, 2021
@sharkdp
Copy link
Owner

sharkdp commented Jul 25, 2021

Thank you for your feature request. I like this idea.

How would you design the CLI for this? Add a new --fail-if-syntax-unsupported flag (or similar name)?

Slightly related? #1597

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

2 participants