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

Re: %F{1} outputs code twice, %F{red} doesn't



On 1 June 2010 23:07, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Fri, 28 May 2010 00:26:49 +0200
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> % print -P a%F{1}a|cat -v
>> a^[[38;5;1m^[[38;5;1ma
>> % echo ${(%V):-a%F{1}a}
>> a^[[38;5;1m^[[38;5;1ma
>>
>> (wasn't sure if those use the same code path)
>>
>> % print -P a%F{red}a|cat -v
>> a^[[38;5;1ma
>
> I'm not sure how you get it duplicated, but it does look to me like it's
> trying to do the same thing two ways, one with termcap, and one with
> ANSI sequences, or whatever you've told it to use instead via
> zle_highlight.

The trick is it only happens with "1", not with "red". The patch appears to
fix it.

-- 
Mikael Magnusson



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