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

Re: [PATCH] Let _approximate work w/ possible compadd function



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