zsh-users
 help / color / mirror / code / Atom feed
* xterm/rxvt title expansion
@ 2002-05-07 11:50 Roman Neuhauser
  2002-05-07 15:19 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Neuhauser @ 2002-05-07 11:50 UTC (permalink / raw)
  To: zsh users

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xterm/rxvt title expansion
  2002-05-07 11:50 xterm/rxvt title expansion Roman Neuhauser
@ 2002-05-07 15:19 ` Bart Schaefer
  2002-05-07 15:46   ` Roman Neuhauser
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2002-05-07 15:19 UTC (permalink / raw)
  To: Roman Neuhauser; +Cc: zsh-users

On May 7,  1:50pm, Roman Neuhauser wrote:
}
}       *xterm*|rxvt*) print -Pn "\e]2;%~\a"
} 
} roman@roman ~ > cd /usr                                          101:0
} sr

Obviously your terminal is failing to interpret "\e]2;" as the sequence
to begin writing to the title bar.  It sounds from the other symptoms as
if it might be interpreting it as writing to an emulated status line.
You aren't running your shell from inside the "screen" program in that
terminal by any chance?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xterm/rxvt title expansion
  2002-05-07 15:19 ` Bart Schaefer
@ 2002-05-07 15:46   ` Roman Neuhauser
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Neuhauser @ 2002-05-07 15:46 UTC (permalink / raw)
  To: zsh-users

> From: "Bart Schaefer" <schaefer@brasslantern.com>
> Date: Tue, 7 May 2002 15:19:47 +0000
> To: Roman Neuhauser <neuhauser@mail.cz>
> Subject: Re: xterm/rxvt title expansion
> Cc: zsh-users@sunsite.dk
> 
> On May 7,  1:50pm, Roman Neuhauser wrote:
> }
> }       *xterm*|rxvt*) print -Pn "\e]2;%~\a"
> } 
> } roman@roman ~ > cd /usr                                          101:0
> } sr
> 
> Obviously your terminal is failing to interpret "\e]2;" as the sequence
> to begin writing to the title bar.  It sounds from the other symptoms as
> if it might be interpreting it as writing to an emulated status line.
> You aren't running your shell from inside the "screen" program in that
> terminal by any chance?

    no. just the usual Xfree86 and a window manager.

-- 
FreeBSD 4.4-STABLE
5:44PM up 8 days, 8:10, 13 users, load averages: 0.07, 0.10, 0.08


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-07 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-07 11:50 xterm/rxvt title expansion Roman Neuhauser
2002-05-07 15:19 ` Bart Schaefer
2002-05-07 15:46   ` Roman Neuhauser

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).