screen-devel
[Top][All Lists]
Advanced

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

[screen-devel] autoaka and set title interfering


From: Hans-Christoph Wirth
Subject: [screen-devel] autoaka and set title interfering
Date: Wed, 29 Jul 2009 14:44:18 +0200
User-agent: KMail/1.9.6 (enterprise 20070904.708012)

Dear screen developers,

I see a bug with auto-aka feature in screen 4.0.3.  To reproduce:

0. use bash or another shell with prompt ending in '$ '.  Ensure that
   the null title command, "<esc>k<esc><backslash>", is included in
   the shell prompt.

Below, ^A means ctrl+a.  Press the following key sequence:

1. ^A:shelltitle "$ |foo"
2. ^Ac
3. ^AA bar
4. sleep 2

Expected:
1. Sets the default title for new windows to 'foo'
2. Opens a new window with title 'foo'
3. Overrides the title of the new window to 'bar'
4. Invokes a sleep command in the new window

We expect at this point the window's title to turn into 'sleep' for 2
seconds, then return back to 'bar' as requested interactively by the
user.  However, screen-4.0.3 erroneously resets the title to the
session-wide default 'foo'.

The attached patch is a proposal for a fix of this issue.  Moreover,
the arguments to the "title" command, the "-t" option, and the
"<esc>kWINDOWTITLE<esc>\" terminal sequence now undergo a similar
parsing of SEARCH|TITLE as known from "shelltitle".  This enables
interactive and programmatic changes to windows in auto-aka state,
like in

   /bin/echo -ne \\033k`pwd|sed 's/.*\///'`\\033\\\\

or in more sophisticated applications.  Use the special title "|TITLE"
to disable the auto-aka heuristic in a window.

H-C

Attachment: screen-settitle.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]