Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A serious bug in execution – where to debug?
- X-seq: zsh-workers 44595
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: A serious bug in execution – where to debug?
- Date: Tue, 30 Jul 2019 19:55:38 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+CIPKaa9SCC59JLEQLjx5D0l5XiQugjzi+uxvzp8C2k=; b=kvQAqC0OCc4AWWU5r+s5MdeT/xIY4mHHPYaYPGjLm/AuWJQG/jehO/nXL8hBGXV/hg yZxewg1sfF/NOFyRTsf9KZZlxSjU1LKcCYjK3ENkOBon8YPmDEmi/sK78/OrTQHF6/Ng zIb5Rig/axPEanXI4w0jc08Tt3yEL+9szwgSl9UbM3zyCjCgTVQhZClpnc61RiijoIyB caramTRVkw5EXMK1o+KgGK2hM7LhEZoKp2Y4otjc1j5b0tsA3WDASGrQ5ocg2g1cfrdF q3eZdN3Swrd13m2rwYbLsYIbCBrwdu6/7s6C96MxIwD0PVNCHOjQOFw2g8K5RyCedBHH W2ng==
- In-reply-to: <CAN=4vMpWFR=_TPZ2hcQC_FvKSiPFW2_isn_BYxYaoUKLqu-4Gw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCKrg_PnZ6jKLoAwR8XQnswT-Bs2TJA7oefhd_gRtHKUQ@mail.gmail.com> <CAN=4vMpWFR=_TPZ2hcQC_FvKSiPFW2_isn_BYxYaoUKLqu-4Gw@mail.gmail.com>
On Tue, 30 Jul 2019 at 19:42, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
> > - print before the call does output, after the call – doesn't (as
> > arranged as in here: http://psprint.blinkenshell.org/zle-exit-fun.png)
> > - the plugin's following zle -F {descriptor-#} call reports error:
> > --zplg-shadow-zle:zle:64: No handler installed for fd 21
> > meaning that the execution didn't really reach the point where an
> > actual builtin zle is being called by the shadowing function.
>
> Perhaps because of this?
>
> https://github.com/romkatv/powerlevel10k/blob/f14497918f0a70955f6d227d1e002ad2a3f94cc8/gitstatus/gitstatus.plugin.zsh#L302-L307
Nice argument, however this doesn't explain:
- why the actual zle -F isn't called in the later of the prematurely
exited function,
- why changing the meaningless line in the return-causing function
cancels the effect.
> Feel free to send me a PR replacing `zle` calls in this file with
> `builtin zle`. I suppose you aren't shadowing `builtin` for good
> measure?
Yes, implementation of plugin effects withdrawal (i.e. unloading)
bases on this. I saw that your initialization of the prompt is called
from precmd, where the shadowing isn't active. So (today) I've
implemented: on-demand wrapping of any function call with the
shadowing-enabling code, and then after a single call unwrapping. This
way I'm able to unload your plugin.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author