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

Is there a way to run bat with -f (similar to tail -f) to follow a file ? #3065

Open
mxaddict opened this issue Aug 9, 2024 · 1 comment
Labels
question Further information is requested

Comments

@mxaddict
Copy link
Contributor

mxaddict commented Aug 9, 2024

Is there a way to run bat with -f (similar to tail -f) to follow a file ?

@mxaddict mxaddict added the question Further information is requested label Aug 9, 2024
@Alessandro201
Copy link

As far as I'm aware it does not have an option to do it itself, however you can combine it with tail -f.
From the README:

bat can be combined with tail -f to continuously monitor a given file with syntax highlighting.

tail -f /var/log/pacman.log | bat --paging=never -l log

Note that we have to switch off paging in order for this to work. We have also specified the syntax explicitly (-l log), as it can not be auto-detected in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants