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 8c8843c2 for ; Tue, 30 Jul 2019 21:39:18 +0000 (UTC) Received: (qmail 8718 invoked by alias); 30 Jul 2019 21:39:13 -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: 44610 Received: (qmail 18542 invoked by uid 1010); 30 Jul 2019 21:39:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f44.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.44):SA:0(-2.0/5.0):. Processed in 1.703713 secs); 30 Jul 2019 21:39:13 -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.44 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; bh=yrUBvCUgSEoYEdkbuOX7c/NzEp8xDsDYmW4/2NE0W84=; b=h7hiyCU6x0mQw/QoWxenY39BqQTy1RPkNamtfN/NElALZV6MMVNRwhMUyuqv7Lvte6 AHiM1PmeVIP06sYLDnRb+K1+47UWszvk3SFqSbB09hDoEyp7z5rgPuniJ+zVFU+0GAJj 3DTaQLI941bFnwyRoupBmKrs7BkH15gySx7yIVUbOGEsJexsR2MK+oFAYXcQYxDgUy25 rogp9Ao/AMl+hb0TbvgiIRSiY9y2s9huqpi3V/9ji2RrwmH5gCh6P44+CiYS7HK47tib Skwc1iU6PPu0AO4a6XJgu6gFPZIuc0KKtSmEPo9y1gg+5KUeM8c2By/gNibwB9ver5J7 gSEw== 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; bh=yrUBvCUgSEoYEdkbuOX7c/NzEp8xDsDYmW4/2NE0W84=; b=ijupkzsi2wFzNJgpG0VNrDPV84U6xbBZ29WOLtFmEQH7mPNBOw77BNXDUKDoVdTJSJ aSIbkgaa3xSEoXp9sbRbuOwaEg/rynd6vyb28O4nc5s12fGyYrhBe/CQEBJ/bGyS3p7J MHhGuycu141EAF8WDwaCRVVOmbpHE/UV55I0JgM8kunxv+ztYApMtFB+MKVMKUTPi0mM T3EmdYH+wtfx3WjFijvny3nWcBEDtsrwWA5h0edYM0mtdT/nh590xug+m4WoGh9AHaER DlL7ZFWISSNaBWghcN9W+5o4l9m78+9OaTMvRBEklFkMYGE/5qvOsUw+UDU+rvoRhgPl JuKg== X-Gm-Message-State: APjAAAV8TJ9PGMTCtJ4KejyU96B3fb4OBYMQt7vzb7h20WEzzDAsDiv8 9la7M1OaGOcseNQSv1FQOGaW1N+nHtqo4Z6ub34= X-Google-Smtp-Source: APXvYqwZS4VmTpjP3OOPJ9dQ0HU7vjm6Pqq4R9/FnMF6dIrGoCpnI/KsEwaAqgkD9/h02e6/6WDuNHrs97x9Wvya5Iw= X-Received: by 2002:a67:694f:: with SMTP id e76mr21176252vsc.77.1564522718547; Tue, 30 Jul 2019 14:38:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Tue, 30 Jul 2019 23:38:26 +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: Bart Schaefer , Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Tue, 30 Jul 2019 at 23:02, Roman Perepelitsa wrote: >> On Tue, 30 Jul 2019 at 20:28, Bart Schaefer wrote: >> > If you change the [[ ... ]] && ... to an if/then, does the behavior change? >> > If you add a "return" or "return $?" at the end of the function, does it change? >> >> a) yes, the problem cancels with if-then >> b) no, adding one of the return's doesn't change the behavior > > I think Bart solved it. Do you have `emulate -L zsh` in your `zle` function? No, but adding it helps. Any emulation (sh, ksh) does. Aah, so this is the errreturn option set within your plugin! and the if-then was setting the return code to 0. A very interesting situation, having your code called in foreign context, to know what options to defend from.