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

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




Em 19/09/2021 14:07, Greg Wooledge escreveu:
> On Sun, Sep 19, 2021 at 01:54:48PM -0300, Dedeco Balaco wrote:
>>> Once we know what $TERM is, we can advise.
>>>
>>
>> $  echo $TERM
>> xterm-256color
> 
> Huh... OK.
> 
> 
> On Sun, Sep 19, 2021 at 01:58:16PM -0300, Dedeco Balaco wrote:
>>
>>
>>>   tomas@trotzki:~$ echo $PS1
>>>   \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
>>>
>>
>> There has been a lot of time that i use a fancy PS1. But it does not
>> touch the terminal title, it never did. I just worked in it to get a
>> satisfying informative prompt.
> 
> Oh, are you saying that you're not using Debian's default PS1?  That's
> probably why it's no longer working the way you expected.
> 
> If you'd like to return to the previous behavior, you'll want to add
> something like what Debian has in /etc/skel/.bashrc to your own .bashrc
> file.
> 
> Since your TERM variable begins with "xterm", you can simply copy the
> case command directly from the Debian .bashrc file into yours:
> 
> 
> # If this is an xterm set the title to user@host:dir
> case "$TERM" in
> xterm*|rxvt*)
>     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
>     ;;
> *)
>     ;;
> esac
> 
> 
> Put that chunk of code anywhere in your .bashrc after your PS1 assignment,
> and it will add a prefix that sets the terminal's title.  You can alter
> it to suit your own preferences.  Just make sure that whatever you add
> is surrounded by \[ \] and contains one of the sequences for changing
> the terminal title.  (There are three of them in xterm, depending on
> whether you want to set the title, or the icon's name, or both.  Debian
> is using the one that sets both.)
> 

I do not understand you. I have said my prompt is (and always were)
fancy. Then, you say that this might be the cause of the problem - BUT,
as a possible try to solve, you tell me to make another fancy prompt.

And do not forget one thing: the tabs' titles are working almost as they
were before. With vim, sometimes, it does not reset when vim exits, as
it always did, since around 20 years ago.

I check all lines in /etc/skel/.bashrc. It does not show me anything
new. My prompt contains only things that it has, and sometimes different
(skel does not use as many colors as i do, for PS1).


Reply to: