* On 2021 19 Sep 12:26 -0500, Dedeco Balaco wrote:
> 
> 
> Em 19/09/2021 14:07, Greg Wooledge escreveu:
> > 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.

This is not "another fancy prompt", it is code to set the terminal title
and does not affect nor replace your prompt as it adds code that is not
displayed in the prompt to the PS1 variable.  Any user setting of PS1 is
undisturbed as shown by the $PS1 at the end.

> 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've not used Vim as a main editor until very recently, right about the
time that Bullseye was released.  I don't see Vim changing the tab
titles though I do see Midnight Commander changing them as the directory
and/or panels are switched.

> 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).

My PS1 is very complex (I posted its code here a few weeks back), yet
the path when I cd to a directory is reflected in the tab title (gnome
terminal) as is whatever mc sets it to.

As I cannot say whether Vim formerly set tab titles, I must stop here.

- Nate

-- 
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819

Attachment: signature.asc
Description: PGP signature

Reply via email to