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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 89280222F4 for ; Fri, 17 May 2024 21:00:49 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1715972449; b=DoNu4lk6kAM/vpm8nnF0hDHukEiFAXdbqWDya15vAq0kb23UvpPe0UJBrGoyDPJ8sZdLm002Wy QeYd36vih2BMl71D1VNttUWwHjMxhvR8E0oSrpAtAVRYysuvdzNdmXkXu/kf23aFAVOhcfeYSH Uspb0BmNRAXzjkVNu2JYxhuW+y2zfZcb7FYruVWh1o7ADVIBUkxCaYS0OnpTSrNDhw4WJD6k9r T9xA3D4AQbt2lO5xy3kPdl5F0VScuvwxFWH71AWNXdYL4h3WRNj5jph/77s3U5Lfrq1X02cZ9D wQydV//ctFsShir4z+nWmFErtlWkp7QPgBFDiFawR1bJEw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lj1-f169.google.com) smtp.remote-ip=209.85.208.169; dkim=pass header.d=gmail.com header.s=20230601 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=1715972449; bh=Ea9u752OqfYxJF7dYGjM71FyzRcpnpwRClgZz7JaCMg=; 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=LtryZenbqRFw747aaFdwptNVlpqtqYcSPcmsqSVZ4eYFEsHn83SoKgGrCUBem1TjZCpl9FmsSG mmsID5zHi7UPa0EHeYwQMqV4zSnvTgTTK6IVlHyqEvQGdNsl9s3ohyHRoqtva+q33rEtotFO7I cLgrowLJ5g2fsB1keBmnx0vT/DhkaPU2MqgRk///qgiE7pBSHXrZgSnqki2j9A1CeZgtAz80ud svt4wAukIf7i+Nl4nPjfOKwkxeK3ZNTyqA3ILlio4OnBF1kHhBVY+2kU7PmfGuW2HyMpmAedr2 unRSM79q0qJZsWM7QZ+Pzqj8NVwKl5WMQNv0sZF806+CnQ==; 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=/WMXjAYFztLYlFk1neXFyXhtX1E/EZu1/0d3buArYfk=; b=B3bSUwBhlmdQBIxuk4cEokACkD lD6+a/XfMryafPr0gvKdSAsALAzfjQ13Q1ThdAUTBoxZ1gctpE1DDCVhOoYGyOIPxQWyC4JOOthcH EIeJhg2k44R7pf7/CjHPtINCQlKowSPmLs2OMOcaBKmdh9HNdRFKya5ULsYrmWdynOfDW8XGQAnW3 1ZTtdgsvhZjt02FD9dgnxOGUe8L7hWMWxFYsPZchM8EQ8FMkQR5weGuEyUqtHF/UZnO+3HQCihX5a vnIQAnwpM5xd8Lg4xpUgxXfkl/rejrsSvu6mF3H0Z7nMJUoML/PF5hBt2/FEFDajjYD4T2HB/IwbR 9GX+i7tw==; Received: by zero.zsh.org with local id 1s82oz-000BAR-8r; Fri, 17 May 2024 19:00:49 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lj1-f169.google.com) smtp.remote-ip=209.85.208.169; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lj1-f169.google.com ([209.85.208.169]:42232) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s82oT-000AR0-LX; Fri, 17 May 2024 19:00:18 +0000 Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2e3efa18e6aso9042821fa.0 for ; Fri, 17 May 2024 12:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715972417; x=1716577217; darn=zsh.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/WMXjAYFztLYlFk1neXFyXhtX1E/EZu1/0d3buArYfk=; b=amcMEiaWpGuFRJMpZw+wgtI5uAi8SIaA+GrGisUKSrFXM5JjoLUNtAx4cin2NYWTL/ jcEuyp4lr4zug1GbxcOj1gUyAh7GQhX+GU9g4INDIR4JkLU3WnMeVBFalYlAXuBM2v/x emZtwWlAnXi5tVWzSw/RwDua1snR/xrHd56wPVFbZenjPWvfeNyEXFcFG01Ia6yuFfC3 0LBfID18lwMVCDm6nXdmYVWyXIZs2zo+b4xl50G0e27iy7/Na8nHE9vfbovj69qld18H 7S7aH3SVccRras4rI7sAGnTqI2+jXGcRDAundQ0XcNIpxmBzXQYNw08k2aGgC48xpBz0 2erg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715972417; x=1716577217; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/WMXjAYFztLYlFk1neXFyXhtX1E/EZu1/0d3buArYfk=; b=fEFG9cBAFHFW1/0aHCT0skf7J5e88rSkWU9qA6mYnUMEUm5z4z7rKVn/ruskX4nKcq yW/fwayd9eRtrEfRq+nArVSaibMDobCb/uBRMWJjTTRIJ4Yo2yFmZFvQNMB/fuYaxEs4 YMzax7YarQqbIRkjP+GuF3mJzm4kcyx5J9QTZFESUdWq/PBXT+8ZtuAxwt/7yL54EYLN tN1x2UZaiJUH58CXt8sS9kH5WXNikuyiAiouuGaOFVuNktBl+QLvrlBU4y4TM3vH8BFN 2RuobZyVXc3SwecKYmMnTCPxCXeBGEPEuEMmp+iNqZg5ENGkySgEsCa4zg0/C/NbQzfj d7uQ== X-Gm-Message-State: AOJu0Yy4a2j+joVdHaa8pRJ2MoQ9QeSaqex0Ym5MggAOP4kJk2VVyKtg +HrEC6R/RRQxhhEeki7b7ylq5XJ2t0HiGNnAVYg3x1fzONI/oe/xCtGvrS1d30GypvBTotPBGhl r6XIx7SqA13KaW9rWCQRkTxisS4f30HukqkM= X-Google-Smtp-Source: AGHT+IHhwMVPQefwJbsRYxyqgbv7hyXS8WLhyvBeCgBDDXameW3LQx01G4JXY4HUjEmdqq4DjhvMsKvlbD6SEKaQCRk= X-Received: by 2002:a2e:a60a:0:b0:2e7:24d:4f44 with SMTP id 38308e7fff4ca-2e7171cc6e9mr2511fa.23.1715972416594; Fri, 17 May 2024 12:00:16 -0700 (PDT) MIME-Version: 1.0 References: <9b97bc99-1d92-46f1-8841-c757d1dcee68@eastlink.ca> <09115b25-9017-4233-aaf2-6e4378aba53f@eastlink.ca> <4b8449d3-7dfe-4d37-9c6d-1dcf63d1d9b1@eastlink.ca> <2b657d1a-4bf3-4756-bb1f-6df9d49ecb13@eastlink.ca> In-Reply-To: <2b657d1a-4bf3-4756-bb1f-6df9d49ecb13@eastlink.ca> From: "Mark J. Reed" Date: Fri, 17 May 2024 15:00:04 -0400 Message-ID: Subject: Re: exit to shell from nested function calls. To: Ray Andrews Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="00000000000055ebf40618aaf65a" X-Seq: 29947 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: --00000000000055ebf40618aaf65a Content-Type: text/plain; charset="UTF-8" The Bolsky & Korn KornShell book is a good start, actually. Lots of stuff zsh has added that's not in there, but as far as first principles go ... Mark J. Reed On Fri, May 17, 2024 at 14:53 Ray Andrews wrote: > > > 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. > > > --00000000000055ebf40618aaf65a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The Bolsky & Korn KornShell book is a good start, act= ually. Lots of stuff zsh has added that's not in there, but as far as f= irst principles go ...

Mark J. R= eed <markjreed@= gmail.com>


On Fri, May 17, 2024= at 14:53 Ray Andrews <rayandr= ews@eastlink.ca> wrote:
=20 =20 =20


On 2024-05-17 10:36, Bart Schaefer wrote:
=20
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.=C2=A0 There are things like the above that can only be learn= ed by instruction -- or by endless grief.=C2=A0 Need zsh classroom where t= he teacher knows what you need to know before you know you need to know it.=C2=A0 A very good book would be nice too.=C2=A0


--00000000000055ebf40618aaf65a--