[Top][All Lists]

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

Re: Automatic title-ing in screen

From: Thomas Köhler
Subject: Re: Automatic title-ing in screen
Date: Wed, 29 Dec 2004 06:54:05 +0100
User-agent: Mutt/1.5.4i


address@hidden wrote:
> Does anyone have a working sample of the hack described in the section
> "TITLES" of the man page. The idea is apparently to get screen to
> dynamically update the window's title as one switches to a different
> application.. I've tried lots of things the last couple of days and I
> haven't gotten anywhere. In particular I'm not sure I understand the
> part about a null title-escape-sequence output as part of the shell
> prompt. Not sure if it needs to be typed literally. The bash man page
> and the Bash Prompt Howto did't help much either. Either this doesn't
> work in the version of scren I'm running or more likely I'm missing
> something.. So may be a good example might help clarify..?

I have this in my .zshrc:

function preexec {
   if [ "$TERM" = "screen" ] ; then 
      local y
      y=(${(s: :)1})
      echo -n "k$y[1] ($(tty|sed -e 's,/dev/,,'))\\"

My precmd function contains something like this:
function precmd {
   PROMPT="[snip] kzsh ($(tty|sed -e 's,/dev/,,'))\\ [snip]"

Helps me a lot :)


 Thomas Köhler       Email:       address@hidden
     <><             WWW:    
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

Attachment: signature.asc
Description: Digital signature

reply via email to

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