From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19814 invoked from network); 13 Jul 2000 01:43:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Jul 2000 01:43:31 -0000 Received: (qmail 5247 invoked by alias); 13 Jul 2000 01:43:15 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3277 Received: (qmail 5239 invoked from network); 13 Jul 2000 01:43:15 -0000 Subject: Re: esc seq in prompt In-Reply-To: <200007130107.LAA449963@yoyo.cc.monash.edu.au> from Scott Smedley at "Jul 13, 2000 11:07:36 am" To: Scott Smedley Date: Thu, 13 Jul 2000 02:43:26 +0100 (BST) CC: zsh-users@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Scott Smedley wrote: > red=`print -nP '\e[\033[31;;1m'` red=$'\e[31m' etc. You have the \e[ part doubled, and it's more efficient to use $''. > export PROMPT=$green$MACHINE$color1$errno">"$color2"> "$white PROMPT="%{$green%}$MACHINE%{$color1%}$errno>%{$color2%}> %{$white%}" %{ and %} must surround all parts of the prompt that don't affect the cursor position. Otherwise zsh has no idea how much space the prompt will take up on the screen. This is addressed in the FAQ, question 3.25. -zefram