Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh and xterm
- X-seq: zsh-workers 2337
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: Pierpaolo.Righini@xxxxxxx (Pierpaolo Righini)
- Subject: Re: zsh and xterm
- Date: Fri, 8 Nov 1996 13:18:23 +0000 (GMT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <Pine.A41.3.95.961108120347.31252A-100000@xxxxxxxxxxxxxxx> from "Pierpaolo Righini" at Nov 8, 96 12:08:46 pm
>PS1="$(print "\033")]2;[ $_U ]%m: %/$(print "\007 \r")$PSB "
>
>and in fact this works for the title but then i have problems with the
>muliline editing (it supposes to have written the title also after the
>prompt and so the line is broken too early).
Yes, you need to indicate to zsh that part of the prompt doesn't take
up any space on the screen:
PS1="%{$(print "\033")]2;[ $_U ]%m: %/$(print "\007 \r")%}$PSB "
^^ ^^
But in this case it would be better to use the chpwd feature:
function chpwd {
print -nP "\033]2;[ $_U ]%m: %/\007"
}
chpwd gets executed every time the current directory changes. Other
things of this nature can be done using precmd, which is executed
before the prompt is displayed.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author