diff --git a/lib/imgcat.go b/lib/imgcat.go index f6bb68f..7baa1d2 100644 --- a/lib/imgcat.go +++ b/lib/imgcat.go @@ -42,7 +42,16 @@ func CatFile(fileName string, w io.Writer) error { func embed(r io.Reader, w io.Writer) error { - inScreen := os.Getenv("TERM") == "screen" + var inScreen bool + switch os.Getenv("TERM") { + case + "screen", + "tmux", + "tmux-256color": + inScreen = true + default: + inScreen = false + } buf := new(bytes.Buffer) _, err := buf.ReadFrom(r)