Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: esc seq in prompt
- X-seq: zsh-users 3277
- From: Zefram <zefram@xxxxxxxx>
- To: Scott Smedley <scottie@xxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: esc seq in prompt
- Date: Thu, 13 Jul 2000 02:43:26 +0100 (BST)
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <200007130107.LAA449963@xxxxxxxxxxxxxxxxxxxxx> from Scott Smedley at "Jul 13, 2000 11:07:36 am"
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author