Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Let _approximate work w/ possible compadd function
- X-seq: zsh-workers 51883
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Let _approximate work w/ possible compadd function
- Date: Tue, 20 Jun 2023 20:49:47 -0700
- Archived-at: <https://zsh.org/workers/51883>
- In-reply-to: <20230615142916.20616-1-marlon.richert@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Ybqejw7PzLwPB1+uPfa09gvVoY-qO_RQtHBEuKLd2q7Q@mail.gmail.com> <20230615142916.20616-1-marlon.richert@gmail.com>
On Thu, Jun 15, 2023 at 7:29 AM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> +_shadow -s _approximate compadd
> +compadd() {
> + local ppre="$argv[(I)-p]"
> [...]
> +
> + compadd@_approximate "$_correct_expl[@]" "$@"
> +}
I'm concerned that this doesn't work in the event that _approximate is
called recursively. Maybe that never happens? If it did, "_shadow
-s" will not re-create compadd@_approximate, but _unshadow will remove
it, in each case leaving "compadd" pointing at the wrong earlier
shadow.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author