Is it possible to pipe the formatted content of bat to a file? #2746
-
I'm trying to pipe the nicely formatted content (including line numbers and file names) to a file
But this only pipes the plain text without file names. I can see why that would typically be desirable, but is there a way to include everything? |
Beta Was this translation helpful? Give feedback.
Answered by
einfachIrgendwer0815
Oct 26, 2023
Replies: 2 comments 2 replies
-
You could try explicitly setting the style so it doesn't resort to plain while piping https://github.com/sharkdp/bat#output-style |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jmcharter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
--decorations=always
should include it, I guess.