From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6902 invoked by alias); 29 Sep 2016 06:40:52 -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: X-Seq: 39488 Received: (qmail 21433 invoked from network); 29 Sep 2016 06:40:52 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.667713 secs); 29 Sep 2016 06:40:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ydbcYB71pdSdrGAU Ku6y2/PQ6SY=; b=xEGWy2D0RQTZofNeB1IFGVS3krD3RM2zn5xaxUokEYfJ2aRf 9eptGNmdWGMllPxdVZBtI8gYiYRC+RYJ/NJOwrACp4bhCk8p1qpc1XXt+ASFYMhj CwcMDRwRzPwencpJJa8jL4L2t0jeOr2lpdI3+gy3sU0/bQhs4JJiZN6mhlQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ydbcYB71pdSdrGA UKu6y2/PQ6SY=; b=Bp55MV1d8K8iJOtLPqmS2t/vE/u4zbuUnvH+r+zI533a6T6 zZigP9pp518X22LoU/ZjD2ChRb4o5ZlmG2FcroogNtChfE4hj5MFZBw9UMXImGJu f7DBsNHmQmHzVhTcCdpw0Z9G6+H/lWRS4bpr8Nmv5z89t/gN5y6iYc40yVcw= X-Sasl-enc: c/yiLkk2V0u4WNPlgosyCtnI6oEibA84ky6Lqz7hfo2S 1475131244 Date: Thu, 29 Sep 2016 06:39:16 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: _dispatch (was Re: PATCH: [for consideration] TMPSUFFIX) Message-ID: <20160929063916.GA4351@fujitsu.shahaf.local2> References: <160925155112.ZM23899@torch.brasslantern.com> <20160926072546.GA28316@fujitsu.shahaf.local2> <160926091922.ZM26758@torch.brasslantern.com> <20160927070039.GA20798@fujitsu.shahaf.local2> <160927122050.ZM13394@torch.brasslantern.com> <20160928102417.GA2729@fujitsu.shahaf.local2> <160928114917.ZM32186@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <160928114917.ZM32186@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) Bart Schaefer wrote on Wed, Sep 28, 2016 at 11:49:17 -0700: > } + { > } + eval "$comp" && ret=0 > } + } always { > } + if (( TRY_BLOCK_ERROR )); then > } + ... throw the exception ... > } + fi > } + } > > Sadly, that won't do it either -- TRY_BLOCK_ERROR is not set: > > The eval captures everything and turns it into nonzero exit status. > ⋮ > compdef 'compadd *' f > > There might be another way to permit that without eval'ing, but it > would be convoluted. It might be easier to just give a flag to eval that means "propagate errflag of the evaluated expression to the calling scope"? So the eval itself would be aborted/unrolled, too.