termcapinfo term terminal-tweaks [window-tweaks]
[..]
The first argument specifies which terminal(s) should be affected by this
definition. You can specify multiple terminal names by separating them with
`|'s. Use `*' to match all terminals and `vt*' to match all terminals that
begin with "vt".
[..]
Some examples:
termcap xterm* LP:hs@
Informs screen that all terminals that begin with `xterm' have firm
auto-margins that allow the last position on the screen to be updated (LP),
but they don't really have a status line (no 'hs' - append `@' to turn
entries off). Note that we assume `LP' for all terminal names that start
with "vt", but only if you don't specify a termcap command for that terminal.
从termcap(5):
String capabilities
[..]
te End program that uses cursor motion
ti Begin program that uses cursor motion
# make scrollbar / wheel scrolling work when running screen in gnome-terminal (or other)
if [ "$TERM" = "xterm" ]; then
export TERM=vt100
fi
--
作为参考,我的.screenrc有这个(这个AFAIK不需要):
# Extend the vt100 desciption by some sequences.
termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC
terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC