sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
48.69k stars 1.23k forks source link

Option to display images using Sixel #2649

Closed halvabner closed 1 year ago

halvabner commented 1 year ago

Most modern terminal emulators now support Sixel. I would like to have have an option to display an image file using Sixel instead of <BINARY> or otherwise ^_^

Could there be functionality to provide a custom command for specific file types / extensions? That way we could just tell bat to use some other utility like xxd or some sixel utility for images etc..

keith-hall commented 1 year ago

Generally we'd recommend going in the other direction - use a general terminal based file previewing tool which is configured to use bat for text files and whatever you want for images etc... https://github.com/sharkdp/bat/issues/2079#issuecomment-1046100589 https://github.com/sharkdp/bat/issues/800#issuecomment-987855856