Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh and xterm
- X-seq: zsh-workers 2335
- From: Geoff Wing <gwing@xxxxxxxxxxxxxxx>
- To: Pierpaolo.Righini@xxxxxxx (Pierpaolo Righini)
- Subject: Re: zsh and xterm
- Date: Fri, 8 Nov 1996 22:42:42 +1100 (EST)
- 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
Pierpaolo Righini wrote:
:Hello,
:please, i'd like to know in which way can I alter the appearance of an
:xterm by putting the current directory and hostname in the title.
:I've tried in the ksh-way, putting in the .zshrc:
:
: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).
:Are there other ways to do this? Are there someone who could mail me an
:answer?
You obviously don't have RPROMPT set; it would immediately look worse if
you did. Zsh has no way of knowing which characters get soaked up by the
terminal so you shouldn't put this type of stuff in the prompt.
I have in my .zshrc something like
if [[ -n $DISPLAY ]]; then
print -Pn whatever
chpwd() { print -Pn whatever }
fi
where whatever are Prompt style strings (like your PS1 var).
--
Geoff Wing [gwing@xxxxxxxxxxxxxxx] Technical Manager
Phone : +61-3-9818 2977 PrimeNet - Internet Consultancy
Facsimile: +61-3-9819 3788 Web : <URL:http://www.primenet.com.au/>
Mobile : 0412 162 441
Messages sorted by:
Reverse Date,
Date,
Thread,
Author