Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Count only visible characters?



Sorry. I used the color array ${fg_*[green]} for my prompt. They need to be 
escaped. 


If you want to do character counting as suggested earlier you need to escape 
the %F{...} sequences or it won't work unless you change the replacing pattern 
to recognize %F, %f, %K, %k sequences.

On Friday, 9. April 2010 11:13:44 Frank Terbeck wrote:
> Joke de Buhr wrote:
> > Since you are using prompt expansion you should always escape the color
> > codes with "%{...%}". That's the only way zsh can calculate the length of
> > the prompt line correctly. Otherwise the cursor will not be positioned at
> > the end of the visual end.
> >
> > testing="%{%F{green}%}hello"
> 
> No, with %F{...}...%f he does *not* need to wrap things in %{...%}.
> 
> Regards, Frank
> 



Messages sorted by: Reverse Date, Date, Thread, Author