From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1519 invoked from network); 21 Jun 1997 01:54:12 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 21 Jun 1997 01:54:12 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id VAA14579; Fri, 20 Jun 1997 21:44:17 -0400 (EDT) Resent-Date: Fri, 20 Jun 1997 21:44:17 -0400 (EDT) Message-Id: <199706210148.CAA03999@sgi19.york.ac.uk> From: wjf103@york.ac.uk (Wez Furlong) Date: Sat, 21 Jun 1997 02:48:08 +0100 In-Reply-To: Richard Coleman "forwarded message" (Jun 20, 2:32pm) X-Mailer: Mail User's Shell (7.2.6 beta(3) 11/17/96) To: Richard Coleman , zsh-workers@math.gatech.edu Subject: Re: forwarded message Resent-Message-ID: <"ipgqH2.0.hZ3.m7pgp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3268 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jun 20, 2:32pm, Richard Coleman wrote: : In brief, it seems that %{...%} is not working properly inside PS1. : : In tcsh, I use : : set prompt="%{\033]2;%n@%M:%/ - %l\007\033]1;%l@%m\007%}%h [%T] %B%n%b@%m:%B%.2%#%b " As far as I understand the docs, the string between the %{...%} should not move the cursor in any way - I'm not sure if your sequence moves the cursor or not (I haven't really looked: this is a quickie mail), but this is worth checking in detail. I don't set my titlebar in this way; I use this method: One of the features of zsh is the precmd function which gets run before the prompt is printed. In my precmd function I call another function called title: function precmd () { title Zsh }; function title () { case $TERM in iris-ansi*) print -n -P "\2201.y$* ~ $USER@%m:%~\234\2203.y~ %m:%~\234\2203.y$USER@%m\234" ;; xterm*) print -Pn "\e]2;$* ~ $USER@%m:%~\a\e]1;$USER@%m\a" ;; esac } this sets my title for me on both xwsh and xterm. My prompt variable looks like this: CSI='^[[' prompt="%{${CSI}0m%} %(18328#::%{${CSI}32m%}%n )%{${CSI}35m%}%m %{${CSI}31m%}tty%l %{${CSI}33m%}~ %{${CSI}36m%}%h %{${CSI}35m%}%03. %(?::%{${CSI}32m%}%? )%{${CSI}0m%}> %(#.#.)" Where 18328 is my numeric userid. Note that the ^[ is actually a quoted ESC put in by vi : I can't remember if I managed to get it working with \033, but I'd guess not judging by that ESC :) Sorry I haven't explained much, but I've gotta go - no doubt some of the other readers of the list will go into more detail... -- Wez - Electronics Undergraduate at the University of York URL : http://www.twinklestar.demon.co.uk/ Insult Of The Day: Thou mammering tardy-gaited death-token!