Why must default-terminal be ‘screen’, ‘tmux’ or a derivative of them? Is this still true today? #4283
Replies: 1 comment 3 replies
-
I'm not sure how you can write your first two paragraphs and not know why TERM needs to be set correctly. If TERM tells the application to clear the terminal by sending Setting TERM to alacritty inside tmux is likely to mostly work because tmux and alacritty have many commonalties and are both based on the protocol originally designed for the DEC VT100 and later DEC terminals. But you may find that some features of some applications do not work, or work incorrectly. |
Beta Was this translation helpful? Give feedback.
-
tmux(1)
statesIt is my understanding that
$TERM
informs applications about the capabilities of the terminal which can affect various behaviors such as color support, control sequences, function keys and mouse support, and other terminal features.terminfo
is a database and a set of libraries to describe the capabilities and characteristics of various terminal types. Applications lookup$TERM
in terminfo db and can dynamically adjust their output based on the terminal's capabilities.I'd like to better understand, say there is a program call
foo
. Whenfoo
starts, it will use the env variable$TERM
to determine the terminal and then look up the terminal's terminfo. Here is anstrace
fromfoo
:If I am using a terminal like
alacritty
,foo
wantsalacritty
's terminfo. But if I launchtmux
from myalacritty
terminal, doesn'ttmux
make more instances ofalacritty
? Shouldn'tfoo
wantalacritty
's terminfo, ortmux
's?Or, does
foo
readtmux-256color
terminfo so it knows how to output intotmux
andtmux
readsalacritty
's terminfo so that it can output toalacritty
? So an output fromfoo
will befoo > tmux > alacritty
.The capabilities between
tmux-256color
andalacritty
and pretty significant and I am wondering if I cannot setdefault-terminal
to bealacritty
if I will be giving up some capabilities.Perhaps I am over complicating things, but I am trying to understand how things work. I'd like to know why I need the following in my
tmux.conf
instead of
Beta Was this translation helpful? Give feedback.
All reactions