Open max-sixty opened 5 months ago
Hi @max-sixty, could you confirm that the command you're trying to execute is similar to this:
bat * -p -A | tee output.txt
I was able to reproduce what you pointed out as the output.txt file will contain the executables in the folder.
The same output is created from cat
, so I don't know if the project wants to deviate from it adding a separate feature.
If someone agrees with this feature request, I'd be happy to give it a go :)
Hi @max-sixty, could you confirm that the command you're trying to execute is similar to this:
bat * -p -A | tee output.txt
Yes that's correct!
The same output is created from
cat
, so I don't know if the project wants to deviate from it adding a separate feature.
Yes, my suggestion was a --display-binary/--skip-binary
flag...
Yeah, i think it's a good idea. I could implement something for this if nobody has anything against it :)
I'm trying to write a repo of files all to a single file. I'd like to take advantage of
bat
s feature to omit writing binary files.But when piping output to a file, bat writes binary files. I think
-f
avoids writing binary files, but will then write colors, which I don't want.I think it would work to have the opposite of
--all
(ref https://github.com/sharkdp/bat/issues/2043), which will write binary even when writing to a TTY. Possibly this synthesizes to an option of--display-binary/--skip-binary
...?