Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] zle_highlight fails to highlight suffix added with compadd -R
- X-seq: zsh-workers 49393
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Marlon Richert <marlon.richert@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] zle_highlight fails to highlight suffix added with compadd -R
- Date: Wed, 8 Sep 2021 04:13:36 +0200
- Archived-at: <https://zsh.org/workers/49393>
- In-reply-to: <CAH+w=7Y0yT7d+HBuZ37dWGfSf_CQJfHp5Z9h9d9WTuCgRL_Kow@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDs6wmFE+gPXoJUuiVBHXX9d6umbms53tK65KnDsSFBugg@mail.gmail.com> <CAH+w=7Y0yT7d+HBuZ37dWGfSf_CQJfHp5Z9h9d9WTuCgRL_Kow@mail.gmail.com>
On 9/8/21, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Sep 7, 2021 at 3:07 AM Marlon Richert <marlon.richert@xxxxxxxxx>
> wrote:
>>
>> _tst() { compadd -S '<SUFFIX>' -q -- '' }
>> _tst() { compadd -S '<SUFFIX>' -r '' -- '' }
>> _tst() { compadd -S '<SUFFIX>' -R '' -- '' }
>>
>> With the first two functions, <SUFFIX> correctly gets highlighted as
>> autoremovable. However, with the third function, <SUFFIX> does not get
>> highlighted, even though it is autoremovable.
>
> -R is supposed to be followed by the name of a function. You gave it
> the empty string. That should probably have been an error right off
> the bat, but it does mean the suffix can't possibly be autoremoved.
>
> However, the same highlight behavior occurs even if you do supply a
> working subroutine. Does anyone remember why suffixfunclen needed to
> be stored separately?
I didn't make any attempt to understand the code, but can you usefully
specify both -r and -R? (it doesn't appear to be an error).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author