From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 54FFC221F3 for ; Fri, 17 May 2024 20:53:13 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1715971993; b=n/PKzrL+A44yxkztllF+BO8HCc14hmabTYRfLCj572o4dixld68ljxWuRtcMFbjG9p25Op4r31 HR/I+jyM0/p2K/pFmToHOTqr2eC7cdnDZdX6dKf8ifypoJI2awH32JEoAgII/tGxHtnpgfpFVr Cjw+8LWNWA3vT3WrTMSL4mHoqnyJBpNCViolsTWwQBBzZBNyssO2TeGcm7abnZ3UOdgC9S4BY0 X/dxyq8ECPgOnY+Cb8+ft0WSeEmgcxuEkxfSPGihsIFPFwTGJIpjJQjfVi2KGf8KP4AfFDKN/Z 6TmHGtGLApz0rV4wlPEy98wgK0xgHSHSe27CqxNpVal5vA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1715971993; bh=08RbZyJEVYni7AY39SM+++e5qoK8PXBnGi0r0HsrDQo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=kKELby0s/PUuFg+5H0ToMtmkGA3bTyWzFu7WbJApb8LrNDrPddVHynCUehaplSJc7qc5o6Ptea gxm4kktog0JWcO74YM2+6C4XiULPEf6haiTkqs0lng+E7WYBGCuIeD3+eYp17nf0V7WSRhbW2V sZspafwS/u4Fs40oEyFqYnr6UozCWnshKyKacjssiuHYjoPHdcJAW1VPOlrbCiz7WE1XR4HvVp aa4vY1qMgvpR5VdttlBSXZN2enCb3EQxGWujAYhkCddvgRHW9P1a6fiPkeG3V2jznVQRhMuLJn rw+3OSiWh5qrT8jfbZPhq6Y97ILrreskxa8MYSTYupSZmw==; 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:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=wFoGvOUO9RavS1jJhGHzSZ66UnE+G5DjSD6k8zMP1Es=; b=Nn1tqOd8IFeHwPiyLsx/BImBOc +eRvcOcKTK2x5NwFcKxO9/qFL4/toUPEEn7K1k+MziDEEO77bXJZjQ3ThDufO87/ieJrmW/tMGnGy aJFJNujZsDMFJP+uKsSnwaOdUG3GolwCHXGqJoQER2C+i4NaM6HhEshfvqe2y8GRTbE3ypFApYnE1 nVlZurvJ3gaa8ambB9ylJh28CmUurKJKw2Ke7BGFCsc6kIgspahHpcaLqZoeKxla9BEG4AYREU7cV eoPnZp6zFJbVSTv7X8whCOJ+JmI56xmKTqguUNAglTmAi71pVjbUV+klEQE60sHIXp/uyLi/le4s3 9B+87nCA==; Received: by zero.zsh.org with local id 1s82hd-0009pN-7V; Fri, 17 May 2024 18:53:13 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:46631) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s82h3-000955-2o; Fri, 17 May 2024 18:52:37 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca ([24.224.136.9]) with ESMTPS id <0SDN13SSP88NM900@mta03.eastlink.ca> for zsh-users@zsh.org; Fri, 17 May 2024 15:52:36 -0300 (ADT) Received: from [192.168.0.15] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id 82h1s6OrXxAjx82h1s7L9i (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 17 May 2024 15:52:36 -0300 X-Authority-Analysis: v=2.4 cv=EfprQ+mC c=1 sm=1 tr=0 ts=6647a774 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=q2GGsy2AAAAA:8 a=cfEes188mTU6G9nbO-AA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=y4qzQ1GovksPTvKTvVgA:9 a=pv1h-76US5xnC3ky:21 a=_W_S_7VecoQA:10 a=lqcHg5cX4UMA:10 a=z9dJwno5l634igLiVhy-:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehgedgfeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduhegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------x8ENPt0PtRO60502gAiDJbtw" Message-id: <2b657d1a-4bf3-4756-bb1f-6df9d49ecb13@eastlink.ca> Date: Fri, 17 May 2024 11:52:35 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: exit to shell from nested function calls. To: zsh-users@zsh.org References: <9b97bc99-1d92-46f1-8841-c757d1dcee68@eastlink.ca> <09115b25-9017-4233-aaf2-6e4378aba53f@eastlink.ca> <4b8449d3-7dfe-4d37-9c6d-1dcf63d1d9b1@eastlink.ca> Content-language: en-US From: Ray Andrews In-reply-to: X-Seq: 29946 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: This is a multi-part message in MIME format. --------------x8ENPt0PtRO60502gAiDJbtw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-05-17 10:36, Bart Schaefer wrote: > On Fri, May 17, 2024, 10:04 AM Bart Schaefer > wrote: > > ... make it a script first, then think about > whether it's simple enough to become a function. > > > Forgot to mention, you can also get the best of both worlds by writing > a function with sections (up to even the whole function body) wrapped > in subshell parens. My whole project of trying to learn zsh 'as you go', was wrong from the start.  There are things like the above that can only be learned by instruction -- or by endless grief.  Need zsh classroom where the teacher knows what you need to know before you know you need to know it.  A very good book would be nice too. --------------x8ENPt0PtRO60502gAiDJbtw Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-05-17 10:36, Bart Schaefer wrote:
On Fri, May 17, 2024, 10:04 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
... make it a script first, then think about
whether it's simple enough to become a function.

Forgot to mention, you can also get the best of both worlds by writing a function with sections (up to even the whole function body) wrapped in subshell parens.
My whole project of trying to learn zsh 'as you go', was wrong from the start.  There are things like the above that can only be learned by instruction -- or by endless grief.  Need zsh classroom where the teacher knows what you need to know before you know you need to know it.  A very good book would be nice too. 


--------------x8ENPt0PtRO60502gAiDJbtw--