From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27482 invoked from network); 7 May 2002 11:34:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 May 2002 11:34:16 -0000 Received: (qmail 23865 invoked by alias); 7 May 2002 11:33:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4928 Received: (qmail 23847 invoked from network); 7 May 2002 11:33:55 -0000 X-Authentication-Warning: roman.mobil.cz: roman set sender to neuhauser@mail.cz using -f Date: Tue, 7 May 2002 13:50:25 +0200 From: Roman Neuhauser To: zsh users Subject: xterm/rxvt title expansion Message-ID: <20020507115025.GB50922@roman.mobil.cz> Mail-Followup-To: zsh users Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.26i Hi there, I'm having trouble getting title expansion to work in rxvt-2.6.4. $TERM is "rxvt"; I'm using Thomas Dickey's rxvt termcap entry (IOW, I do not use the common FreeBSD xterm-color hack), but I can see similar behavior in xterm (XFree86 4.0.3(156)) with TERM=xterm. I used a slightly modified version of the chpwd() function from the FAQ, but strange things happen: chpwd() { [[ -t 1 ]] || return case $TERM in *xterm*|rxvt*) print -Pn "\e]2;%~\a" ;; esac } With the chpwd() above (but the -n switch removed), this is what I get: roman@roman ~ > cd /usr 101:0 sr roman@roman /usr > cd /usr/local 102:0 tc/X11al roman@roman /etc/X11 > history 105:0 ... 101 cd /usr 102 cd /usr/local 103 cd /etc 104 cd /etc/X11 The second cd (!102) displays the third prompt below it, but from then on, the third prompt just gets rewritten, and the string printed by chpwd() changes like so: sr/local -> tc/local -> tc/X11al In xterm, the prompts continue to be displayed below each other; other than that, the behavior is the same (with -n, the string is eaten by "promptcr", without it, it's displayed before the prompt with the first two characters eaten. What's up, and what should I do to get it to work? TIA -- FreeBSD 4.4-STABLE 1:11PM up 8 days, 3:37, 13 users, load averages: 0.29, 0.35, 0.16