From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1599 invoked from network); 10 Mar 2002 01:39:47 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Mar 2002 01:39:46 -0000 Received: (qmail 4136 invoked by alias); 10 Mar 2002 01:39:36 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4749 Received: (qmail 4125 invoked from network); 10 Mar 2002 01:39:35 -0000 X-Authentication-Warning: greux.loria.fr: lefevre set sender to vincent@vinc17.org using -f Date: Sun, 10 Mar 2002 02:38:23 +0100 From: Vincent Lefevre To: Clint Adams Cc: Juhapekka Tolvanen , zsh-users@sunsite.dk, Sven Guckes , jw@cs.fau.de, ric@giccs.georgetown.edu Subject: Re: Titlebar-handling with zsh and screen Message-ID: <20020310013822.GA23829@greux.loria.fr> Mail-Followup-To: Clint Adams , Juhapekka Tolvanen , zsh-users@sunsite.dk, Sven Guckes , jw@cs.fau.de, ric@giccs.georgetown.edu References: <20020309051250.A30021@verso.st.jyu.fi> <20020309051217.GA22866@greux.loria.fr> <20020309051805.GA29385@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20020309051805.GA29385@dman.com> User-Agent: Mutt/1.5.0i X-Mailer-Info: http://www.vinc17.org/mutt/ BTW, for those who are interested, here's my current code for the terminal title: In .screenrc: hardstatus off hardstatus string "%h%n (%t)" termcapinfo xterm*|rxvt hs:ts=\E]2;:fs=^G:ds=\E]2;TITLEDISABLED^G In .zshrc: zmodload -i zsh/parameter precmd() { psvar[1]=$#jobstates; if [[ $psvar[1] -eq 0 ]] then psvar[1]=() elif [[ $psvar[1] -eq 1 ]] then psvar[1]="$psvar[1] job" else psvar[1]="$psvar[1] jobs" fi [[ -n $TTY && $TERM == (xterm*|dtterm|rxvt|screen*) ]] && { print -nP "\e]1;%m:%.\x07" print -nP "\e]2;%(1v. %1v |.)${WINTITLE:+ $WINTITLE |} %n@%m - %~ | %y" [[ $TERM == screen* ]] && print -n . print -n "\x07" } > $TTY } TRAPCLD() { [[ -o interactive && -n $TTY ]] && precmd } However, there's still a problem when a job terminates at the wrong place. For instance: $ sleep 5 & $ screen When the sleep terminates, the title will be (incorrectly) updated. Moreover, I don't understand why the title doesn't come back to its correct value when I hit the Return key. -- Vincent Lefèvre - Web: - 100% validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des Jeux Mathématiques et Logiques, TETRHEX, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA