Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: zftp xterm titlebar

>>> "AB" == Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx> writes:

 >> May I propose the following patch that also take `rxvt', `Eterm',
 >> and `dtterm' (from Sun CDE) into account ?

 AB> This works here but I could not find anything about it in dterm reference
 AB> (TriTeal TED 4.2)

 AB> How portable is it? Do all dtterm's from all vendors suport it?

I don't know.   My dtterm(5) man page reads :

SunOS 5.7           Last change: 25 Apr 1994                   15

Headers, Environments, and Macros                       dtterm(5)


         Esc ] p1 ;  p2 <control>-G
                Set text parameters.  This escape sequence allows
                various  terminal emulator text values to be set.
                Valid supported values of p1 are:

                   0     Change the icon name and window title to
                         the string p2.

                   1     Change the icon name to the string p2.

                   2     Change the window title  to  the  string

                   3     Set the current working directory to the
                         string  p2.  The terminal emulator tries
                         to restart in this directory when it  is
                         restarted in a new session.


        Esc ] l text Esc Backslash
                Set the window title to text.


The second is the same as the `sun-cmd' case in zsh.

 AB> BTW is it possible to get the current window title?

I could print it with : 

$ echo ''

But does someone know how to catch this in a shell script ?  Is there
a better way than using script(1) ?

This is an excerpt of what dtterm(5) says about '' :

        Esc [ p1 ; p2 ; p3 t
                Window manipulation.  Valid values  for  p1  (and
                any additional parameters) are:


                   21    Report  the  dtterm(1)  window's  title.
                         The  terminal emulator returns ``Esc ] l
                         title Esc Backslash''.

This seems to be true for xterm too (which I find strange since xterm
does not accept the resulting ']ltitle\' sequence).

 AB> /andrej

Alexandre Duret-Lutz

Messages sorted by: Reverse Date, Date, Thread, Author