Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: colors & tab completion
- X-seq: zsh-workers 15744
- From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "'Daniel Lyons'" <fusion@xxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: RE: colors & tab completion
- Date: Fri, 7 Sep 2001 12:22:40 +0400
- Importance: Normal
- In-reply-to: <20010907021111.B14003@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
>
> PROMPT="${fg[magenta]}%n${fg[white]}@${fg[green]}%m ${fg[blue]}%C \
> ${fg[white]}%(#.=>.->) "
...
> anyway, that all works fine. the problem is that when one presses
> tab multiple times to activate automenu, this is what gets
> displayed:
>
> "username@host directory -> filename.ext1 ext2"
>
You need to tell zsh that these are escapes (and not counted in prompt
length calculation):
%{...%}
Include a string as a literal escape sequence. The string within
the braces should not change the cursor position. Brace pairs can
nest.
i.e. you need
PROMPT="%{${fg[magenta]}%}...
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author