bat icon indicating copy to clipboard operation
bat copied to clipboard

Option to omit binary content even when writing to a file

Open max-sixty opened this issue 4 months ago • 3 comments

I'm trying to write a repo of files all to a single file. I'd like to take advantage of bats 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...?

max-sixty avatar Apr 04 '24 01:04 max-sixty