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

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).