nsf / termbox-go

Pure Go termbox implementation
http://godoc.org/github.com/nsf/termbox-go
MIT License
4.67k stars 373 forks source link

tmux-256color $TERM unsupported #215

Open doronbehar opened 4 years ago

doronbehar commented 4 years ago

I use Lf which depends on termbox. I set in my .tmux.conf the following:

set -g default-terminal tmux-256color

Using Rxvt-unicode and tmux inside it, get this error when starting lf:

2019/10/06 16:34:09 initializing termbox: termbox: error while reading terminfo data: termbox: unsupported terminal

If I use a different terminal emulator (say, Alacritty), I don't get this error.

If I use the following in my .tmux.conf:

set -g default-terminal screen-256color

In either urxvt / alacritty, I don't get that error from lf.

To summarize, only the combination of:

Causes the error.

I wouldn't mind that much if italics would have worked with tmux inside urxvt when using screen-256color $TERM/`default-terminal. Sfee this FAQ: https://github.com/tmux/tmux/blob/2.1/FAQ#L355-L383

Running env TERM=screen-256color lfdoesn't raise the error but any inner child process of lf reads TERM=screen-256color in it's environment. This means that this env wrapping wouldn't be much helpful because I often use Lf to browse files and edit them, expecting to see italics.

Would solving this be easy by just adding an entry here:

https://github.com/nsf/termbox-go/blob/5a49b82160547cc98fca189a677a1c14eff796f8/terminfo.go#L113-L126

?