From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 0068c00b for ; Tue, 30 Jul 2019 17:56:29 +0000 (UTC) Received: (qmail 14431 invoked by alias); 30 Jul 2019 17:56:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44595 Received: (qmail 9089 invoked by uid 1010); 30 Jul 2019 17:56:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f54.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25524. spamassassin: 3.4.2. Clear:RC:0(209.85.217.54):SA:0(-2.0/5.0):. Processed in 1.906181 secs); 30 Jul 2019 17:56:24 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.54 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+CIPKaa9SCC59JLEQLjx5D0l5XiQugjzi+uxvzp8C2k=; b=iicXBixrUO9lpmXCfvq8vUHJfNiYn7I8XVq44zmEblYVqkE2SYfUB4CZZbH+jIYiXh 5+ivR7GH8mIMsstIB7YBSiBTnQI4qPqiEWmtvHWHyIUPgL4GBhfa5EKKdYSKumVrUkcF fKHDUl5i7sZgUA+cWPQH+UgLh3B/0WRVKZeAr73wIolHUIO8bCk8zzJPVYnWQGtMpm11 SYW60CrNXYmNb6CJK6NHsS3ZN4CZPspDlIq/NL48P0jJFmNKj2YkkfmOQBX+eTvJHb9C tmGUpfF3IawdRNLSUZ6iVGrmgxq9dpLeCY6wyciqLXAv5E23a+S/M4Y+l8/SaqQidtkF MZ+A== X-Gm-Message-State: APjAAAVkMVF018j9z2ZtciMNbzhGwotquZMlt0DBZ+M5ny8SV54g4Dnk NM6Lz3k+uJzMAOF6aTqlVApl9nn8dZMkCNk/uuqgKJhV X-Google-Smtp-Source: APXvYqwyxu9RvDlrPIyR5AwY55OGcLn8gughHurGf6Jag5Gb/U4ffJZh19YZ2/E9rOw7L7uywdwlJDV7nyoxO9maqLs= X-Received: by 2002:a67:80c8:: with SMTP id b191mr75860434vsd.113.1564509349723; Tue, 30 Jul 2019 10:55:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Tue, 30 Jul 2019 19:55:38 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 30 Jul 2019 at 19:42, Roman Perepelitsa wrote: > > - print before the call does output, after the call =E2=80=93 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/f14497918f0a70955f6d227d1e0= 02ad2a3f94cc8/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.