martinlindhe / imgcat

Go port of the iTerm2 imgcat script
MIT License
24 stars 9 forks source link

imgcat not working in tmux 3.4 due to unrecognised $TERM value #1

Open mkgessen opened 3 days ago

mkgessen commented 3 days ago

Hi @martinlindhe,

Thanks for the lovely library! I noticed that imgcat doesn't work in tmux v3.4, as $TERM yields tmux-256color instead of screen.

The current implementation imgcat.embed() requires os.Getenv("TERM") == "screen" to add the DCS tmux magic. Everything works on tmux 3.4 if I add tmux-256color to the recognized $TERM options.

I can submit a PR if you're interested?

$ tmux -V
tmux 3.4
$ echo $TERM
tmux-256color
$ uname -rm
6.10.10-arch1-1 x86-64
martinlindhe commented 1 day ago

Please continue the discussion with said PR.