From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1484 invoked from network); 10 Feb 2022 16:49:07 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2022 16:49:07 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1644511747; b=Ov247qAeXMUvVtHqgFmBTAvgKHpvlPUjuqoj66moTiH9oOn3Q8rNLhzu6LytURPdhEsqkZ7Vy5 lcvmjT/BYNMBoeoSXiww+b35X4wC/wMyCttm5+vjlPjfrMxTC5DHE3WS+2JRenIltCnjnIm2L/ d4yThmk/bajEWoGvYRhQevB6iBY7uyrsmvg2IZ/QghRCI1BY4eopKjClSZyvUFsW3Tv3rI4fG+ zjErPuNAiv24rVJE+8nmR2jiQ82v9RKjYijC50N0nzyxYr7BNNxBTde+SraCoyHSBvl4N6f4ZZ q3FE1ya5BLNpB397PCOxTCLo2AtLK+tB0OWle+O8XgHYHA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-qv1-f45.google.com) smtp.remote-ip=209.85.219.45; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1644511747; bh=+Upa5SL33Zjqijc/Gb2wVrAHBOvYpmMkh3X8rhqPhEw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=I2M2pVV6ASWovw3NUnEwx1y86OzLQCzIwFOweWLC0RGE9Y8ZSSBtDrX2v1NJx5Bilp6qv+/QH5 uN0eiDnjbvAG2nsHRUHJTOJgY27XrPo32qSDNKO+STR8UUooda59K88DW9CAOIjMyNBWUWUeo5 j4R4fJqsxYNlv5kqr9xxJwWuBauSgprJQ403mw9GCtUE3wbWTnX89/qDJ2OY55/LdUeFigt0bu AFwUq0Cabiny0ofZVCYYYPvxyLvFHNA9m0oRZbHuMGWMnnHxiWgj61Zfjqi/83Kx18vnlTjU2C dSnSXktDAnDF+4czEs3lT0V0LK0LR1xKYaSYsMpZRLvQog==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+Upa5SL33Zjqijc/Gb2wVrAHBOvYpmMkh3X8rhqPhEw=; b=qcI0P4H0nF0evKsmqQkjcfbTrI TKG4sospg+LNhtqBk4udGvG87OTH8qW5uXKWQoRd85uBh2me5mvO5ka9d7b5C8+plTR5iMxcyC7ll QprIBiYyiPJ3MAOs9r6e7jWW2buh3CA0jCRcp/ksn7SiryM6tsH1d3gQ2ZT1OF51g5R2yyVIN+nmF n+GoFV7AWcJ8gnR+u46WDPUdB+CUCTF8aTgdqQQlyi90cdtlsHoRvIvIgcEfnYAu/Ai9rdPivj9z/ gyT3ZpnVd6RtiE2hqwxhifCCi2s5SjFHLsGaP9Yk4dcAQo7Pt1PqBb2gioeFxK0nIdnbIas4//t00 F6PfFnjA==; Received: from authenticated user by zero.zsh.org with local id 1nICd1-000GYI-BK; Thu, 10 Feb 2022 16:49:07 +0000 Authentication-Results: zsh.org; iprev=pass (mail-qv1-f45.google.com) smtp.remote-ip=209.85.219.45; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-qv1-f45.google.com ([209.85.219.45]:45693) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nICcQ-000Foe-CU; Thu, 10 Feb 2022 16:48:30 +0000 Received: by mail-qv1-f45.google.com with SMTP id c14so5568212qvl.12 for ; Thu, 10 Feb 2022 08:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+Upa5SL33Zjqijc/Gb2wVrAHBOvYpmMkh3X8rhqPhEw=; b=I+FuGmPDT9aNxnx3wXzQdKBmonbsBJzmXeb551e5HFAKwC261zLF5WHfE+fTNXtp60 zXGbtdc1javwJ1tIAyhENQ6/PnRvqFgub5Q4v4hx6Vpm3ccC8XfyjIOrTgl5Sx/t5nbz QVjtHkaxc0nm/6ofH0FJHvc9IAeI67nKXAVps3Q1BYKBZmmR2tGNJdsm7lh56Sedv+vB Qu9lLb4CKiHKjhAsJS0190SDTNnGsFRSeHcaXGQspO+DcM8HKTYKPhadHRdcJ58cJBmW PVlyBitdZuBSjsQGRnYYJJA6G/w1x9TA5NZ7jdoIRqGO02xLcfFend241Gs4fQixTqau z1dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+Upa5SL33Zjqijc/Gb2wVrAHBOvYpmMkh3X8rhqPhEw=; b=G3WpIwsGNwDVNWioMLWnBICYCXm0rEYr3lfzCP2DgrJhXtYOEd+LIRqv2q45apDsh9 JC6XgC9Is8oMw86EVZ6VO/CVaYaNEq8ZhLMjglbw61hBP9IVxvl85ufbHn74ECmSSMe+ DfN5HyoSxe2fULMGtEfeLE5mZ5ejTpWEWxZT5WiyU8Hov58rFunfM1c65rLvHKwPnVLO A3CUXDcrkCONpTKYm0cJ8yADiPZoZ8ZZU/5m+9bCG+p0VZqCRC3wbL1XWSq6G3/tDRB3 jzn+evcTOyk5HApowHa1TxPvunqSA6PNtU88Q0lb6DHWpzefg9lRnMVuy+r7U6G6DWKa wf7g== X-Gm-Message-State: AOAM533yItgPIY19sq9FOYuvyM9w2mTZowiF9Kp1WcuwlFrCTcdUfARt P6QaUmWgvZuR0KrojHHmfSCvIADvep9edTA4v1J27V/eKH4= X-Google-Smtp-Source: ABdhPJws28FUOhQERrj9uIyvm91lU14z48jtrSCbZTZGBkptUIoIIn51p82FISmE7FTzWIxvVPy/PzD6okYeyktyDa0= X-Received: by 2002:a05:6214:19ed:: with SMTP id q13mr5641148qvc.72.1644511709282; Thu, 10 Feb 2022 08:48:29 -0800 (PST) MIME-Version: 1.0 References: <0oea0h1nt14oll0drq3450vng70ro0ga43@tlc.com> In-Reply-To: <0oea0h1nt14oll0drq3450vng70ro0ga43@tlc.com> From: Roman Perepelitsa Date: Thu, 10 Feb 2022 17:48:12 +0100 Message-ID: Subject: Re: zsh function breaks after error To: Thomas Lauer Cc: Bart Schaefer , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27503 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Thu, Feb 10, 2022 at 5:20 PM Thomas Lauer wrote: > > > From: Roman Perepelitsa > > > > What happens if you add `emulate -L zsh` (without quotes) at the top of the > > function? > > Something good happens... it now works as I'd expect! Thanks, will have > to read up about this! This means that err_return option is set in your interactive zsh. This is likely the result of invoking a function that has `setopt err_return` in it without `emulate -L zsh` and without `setopt local_options`. That function needs to be fixed. For example, you could replace `setopt err_return` with `emulate -L zsh -o err_return`. You can read about zsh options and `emulate -L` here: https://zsh.sourceforge.io/Doc/Release/Options.html Roman.