Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux-256color $TERM unsupported #215

Open
doronbehar opened this issue Oct 6, 2019 · 0 comments · May be fixed by #216
Open

tmux-256color $TERM unsupported #215

doronbehar opened this issue Oct 6, 2019 · 0 comments · May be fixed by #216
Assignees

Comments

@doronbehar
Copy link

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:

  • urxvt
  • tmux
  • $TERM=tmux-256color (because of set -f terminal-default tmux-256color in .tmux.conf)

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:

termbox-go/terminfo.go

Lines 113 to 126 in 5a49b82

compat_table := []struct {
partial string
keys []string
funcs []string
}{
{"xterm", xterm_keys, xterm_funcs},
{"rxvt", rxvt_unicode_keys, rxvt_unicode_funcs},
{"linux", linux_keys, linux_funcs},
{"Eterm", eterm_keys, eterm_funcs},
{"screen", screen_keys, screen_funcs},
// let's assume that 'cygwin' is xterm compatible
{"cygwin", xterm_keys, xterm_funcs},
{"st", xterm_keys, xterm_funcs},
}

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants