[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A bug in Vim, in Mate Terminal or in Debian 11?



On Sun, Sep 19, 2021 at 05:13:34PM +0200, tomas@tuxteam.de wrote:
> I can't imagine MATE terminal to implement its own escaping machinery.
> They'll probably copy that of the Xterm, to stay compatible (although
> these days you never know).
> 
> So perhaps the OP gets away with pretending he has an xterm.

That's not would I would suggest.

> @Dedeco: what happens if you say "export TERM=xterm", start a new
> shell [1] (i.e. you say "bash") and then start vim?

It would be more useful to know what $TERM is *currently* set to.
(And also what it was set to by a stretch mate-terminal, but that
may not be important now, or may not be easily discoverable, unless
there's another reader out there running mate-terminal on stretch
who can test it for us.)

> [1] I don't know when PS1 gets refreshed, so being carefully here

Assuming the OP is using Debian's provided .bashrc file (and other
shell dotfiles), PS1 is changed when .bashrc is read, which normally
means when bash is started as an interactive, non-login shell.

Running "bash" would do that.  I prefer "exec bash" because it gives
a cleaner starting point.

But... changing the TERM variable isn't the correct solution.  If
mate-terminal sets TERM to something like "mate-terminal" (speculation),
then there must be a good reason for it.  Maybe they've diverged enough
from xterm that setting TERM to xterm would break something.

If you want the title-changing behavior of bash in a terminal whose $TERM
doesn't begin with xterm or rxvt, it would be better to change .bashrc
and simply allow that PS1 addition to happen on other $TERM values as
well.

Once we know what $TERM is, we can advise.


Reply to: