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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28015 invoked from network); 5 Jul 2023 06:31:01 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Jul 2023 06:31:01 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1688538661; b=balC2+Fsi+Pyo4lAkv3Vwba84dTAmU7gOR7vMrd6Fhsq727wAfM+qN7C7yBjZJTozg80fg4gtj pXL7fPgPFrgAPt8jlIge0ZQG1mo1Bs2cdLiNXnwWfaLP3O3bzJpUJLO5Kx4bzv5Mz+7MldatVh x87d53CLnz6gFVEz0Yx1q0We9TVnLPjTn6HA32BDzPwRfvqbO/ZdJMaycwx0vItmFZ7UA6uBaf X5UgtXiZRGKTIli/e38Z3nnU/tiKSUad/bl2kdlCka3e1MVTjn4N19YmqUeuxiVU3yfpwfBJ+w xCfQgBBFUvFmCZ2++hDHJSfO48Z8WKRcd4/KV44Ulm5EFA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1688538661; bh=67gLbk2qQGRMzxkntnPbqeRa3VCQkcIqOZCM3OngzTw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=H5FDNX4ugqJTfUiBSpTLx1R5SO24kjhH7TwwjkBA3wUu4JObZn+o8fN79ARu115zqwM5reVNz4 CxMEB+VC1fdLwBJjf810qSfF5K3bovrfa16/YBiHfsfAIH3zA1noDNTDoZc6hUKpq9QMmg9ieN E50Q1Qlyfn2qXWECVRfiG2CgO5CUxCuMP0qi3ZbZFqZ2Udjjj+GP8j697vSov6N5OfJnF8MJpJ 8Q9ndBNglmoKfPqbrIwrqRfwG1+TgIOhn4aFXkwZPTWWS44ufCmVv5eYFMOlD5Wf2v8b57ELnN 6YyDKcZRnaYaIyUG9kR7JjoEtRxVlAXpXuwec0zCJrarZg==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=RQlkuS29VMScHlWaz3PoNm4V0bm9GhcsAQFjbBLFL6I=; b=cwCRMIy7q7oUOaGHZNxtL9GtC0 YgkyDV3dhIyKrO6A1Sosh/o+zJwfylDgbGA4zFM5StTMZtv7dXnDjlGv/7nCE3w7oSP+5136JWOm5 hbGUr3tGvlptE7dKeQKhHRDhvsDYRhlUI0llk3lWMAQ7zrN5NDhXXAf5hhSRttneICIXLpsg7Y/gp 6EN5LvN9iKP3ZLgAL5THT85aKOLbeudZStbkfSVEsLD7H++qdCUpaAME0ijTOLWmsLZggdbolm1gd CZsiLytCVPV5KqUjG5xlt+s//RJ4Uk6HYZbPtyQXL31kqSQPKpBoepF/BIhCqSGtAFik6iUw1KESe yyWWG6tg==; Received: by zero.zsh.org with local id 1qGw2X-0002mW-7b; Wed, 05 Jul 2023 06:31:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f54.google.com ([209.85.218.54]:59502) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qGw1x-0002S3-3a; Wed, 05 Jul 2023 06:30:27 +0000 Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-98dfb3f9af6so767296966b.2 for ; Tue, 04 Jul 2023 23:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1688538624; x=1691130624; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RQlkuS29VMScHlWaz3PoNm4V0bm9GhcsAQFjbBLFL6I=; b=wojNy0Jr89NUZ2Ascf3rK0pnGjR8sEYFGSfwotcaz+MD3imssV9S+kgP4TJwrJ/Sch gVgOoq60+8gdCyN3h+nUtt9I484XdN/tRNGgoqCjUj3sJXSDU6EytcpWHNqfTHgpE1Ua ZgtKoOojtRZe+Ny82vdVW+HBj9sqV5K+S2ock6rq1bgXPuf8hOck0NqDw4ZNwEowaI1z csj1ZYVDEsG/bjZAAYEfeYG0rFKtlFyvMkIVgQF81qRyHSJH6e1PFWPFAvlA8mARO3B0 DPdhRHULy/xiAK40Owl50eGasVOcLQACNI16oDbhV7krR1QAAvjCHRfNvt1XUSaMZ7WX FJdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688538624; x=1691130624; h=content-transfer-encoding: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=RQlkuS29VMScHlWaz3PoNm4V0bm9GhcsAQFjbBLFL6I=; b=KCgUaUCupiqOc3uVaBxPh7Xzwmu/Q6mgcDcvvKXh673kYNaoKcLH61mVB0jmgRU/cX 8uR+JQQTLXoDegaefpDqK49bZ+pYQa5jrKtm3quca3kG1YuqijHfDAOhGVWaN+ueW8Pg LXdsbBjnjiFdKUhPCfYVGLc3+/PHzaMZT8GfHfzHlqKlHesmtimuCiszP75nuCU1cAi2 1XpBdYmFA43XZoKdRnsSNcrJvn7855n8/rQ1y0scwfpE7gxKQ+lKU18xvw2onB+nsc40 F80llBrqvk4bBc2had2OsMbUnLPlnC0eyNRW53/rodXIxQ6Z0TTZydX1XWMrZcniA3ac YEEw== X-Gm-Message-State: ABy/qLadV3JIkIN516XGhMJe8CELkpDiU1oFwNAtfRIkLQJV6Px/QrxK 4wkPqlnf7CrHBPkQEHewfy42WJqJQGX1wdeV9QhcfA== X-Google-Smtp-Source: APBJJlHGrtEpw+agAmgIkPiKo0f0vJ75RfSXcLRh259IfjC7pbASBzJP1UKEnSueqr3xiqS9wjDn2dc2uCihQrCoOaM= X-Received: by 2002:a17:906:edbd:b0:992:c0bc:34a2 with SMTP id sa29-20020a170906edbd00b00992c0bc34a2mr10621289ejb.42.1688538624277; Tue, 04 Jul 2023 23:30:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Tue, 4 Jul 2023 23:30:12 -0700 Message-ID: Subject: Re: [PATCH] Support the mksh's ${|func;} substitution To: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51903 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Tue, Jul 4, 2023 at 10:32=E2=80=AFPM Bart Schaefer wrote: > > -- REPLY is treated as a local, i.e., it's value gets saved and > restored around the substitution (Quoting the initial message on the bash nofork thread) > Bash creates 'REPLY' as an initially-unset > local variable when COMMAND executes, and restores 'REPLY' to the value > it had before the command substitution after COMMAND completes, as with > any local variable. This has the side-effect that testing the enclosing-scope value of $REPLY from inside the substitution is impossible. I'm not sure how I feel about that.