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, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2259 invoked from network); 28 Sep 2022 21:24:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Sep 2022 21:24:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1664400295; b=KkIYC1Cpf7h6n8hJBhxxqbWgBVBlrHzIv8UCexvoFthdmtuL+WZA5CvYah2UCQ2+uQGC8iiQgk Fj/LjnnU15DGoTmFu0g37aoq9+m0EDDrWEZr+srlNlJmbtZ5b4dFxDfG8VxElHxORM0aM6a0FL IQ6bZT3lywuJUxelbO/wwm/01OFCuSMbZtEO2EZiErW4O/tqqZWnIVmEtAoqjmEh3nKopVuwtW GW20D41IRdReKRWzYdC4qDyIpohdfOAsvJATmqCF8hJBNHeSpvrP6Ydn9vl8exqDiUp4KYH+aJ kQ7Otbd4F73/7i7EFZmW0o/yUmpA1muPyHO+X8w15ySwZA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; 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=1664400295; bh=J/UQNcsMA0ypcjHP/PoNev1GIMRiNdaX0F7e6dw8Ak4=; 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:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=cGkY8p9L8fmX/ypPr6mcmRdKyleSwnJaKTdbFCzpvRhRLXncwh8NUb0ZvjO9AeVnHXm5uFkpOZ u0e612gqJ/8gY1fYqQJE5xuUKHOYN9OJwIKd1Fe3rXcKUMN9RPrCc+Tcjux0d3LHMzOwv0fDPy 1Rz+BKoglgbfdsGS6DqJTRNo8UnYfB7CMXrxY7G/0IUqroAKTxtt4qks2SUOeI8YUvdl6J5ykz +kcMEwiVrucntzra+G66JcM8DiYGTaIIp11hrZVS1UxEXtXcbgtPb14kTfZTjpxr0lf0OGNjd4 zWQRJT/9iX7yGB+aSVTrCXXXL1QZDgjA+4psYrHwV/oRkA==; 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:References:In-Reply-To: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=On5+1be7xGXjOu8LdLCeRUm3FM/QosXFIydx2PK9N+4=; b=UyMTmxECZEuypyeqASmnUcOgvX pdIfLDIP7z0KhQwwU5UkexBYtxjMEb1OjnkZersjzWPYP2JPOih3lI2akXgJYLUB4tX5LSxBboFYh M7rgqEaIIt4i1YCRJMJglg7Z2vE0/npKOgxTrja6InfMC2tYvp+Owm2BOnONomEbtnW5GuDnD89WZ m8n1S6LT1nFGb3pfdY/FN5EWZYQY0oa+lcM/wEejI6Q5C3r2d41QKZLf+/9+oi7AszMcOhs3sN72y UH4SFQts4s6bDUOzS6ymjpMPGzcM0qY/hlkpqwk/uiZRRi0dCQVKXd3I/2iDqDX/y6lEN+C6VQlk8 8U1delOw==; Received: from authenticated user by zero.zsh.org with local id 1odeY2-000AQX-SW; Wed, 28 Sep 2022 21:24:54 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f42.google.com ([209.85.218.42]:44805) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1odeSv-0009zB-3l; Wed, 28 Sep 2022 21:19:37 +0000 Received: by mail-ej1-f42.google.com with SMTP id r18so29683205eja.11 for ; Wed, 28 Sep 2022 14:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date; bh=On5+1be7xGXjOu8LdLCeRUm3FM/QosXFIydx2PK9N+4=; b=ebSd8ohbD5v+TjrYweav0D6gwW0YaUJ3WB9TqBNVGPD397RK6cK6dQHvE7NGNTS0iB lNt5TPTR7jXVmHfp67aa0L4y8sr+4XqnCKuZ77SOiyH3y8aKPMuq1gTuKb0MWfb9YPLt HCcL8qEvWbf+JB2bkb/3Vvv0Bis5FnsGca/kS1WlqhLjSU9Muzm2eNPkKeDmUgRVtf3m sIKU7OptkWYub7NEjoh7/t1O9O4o3vinQUgSKo5e7KjlLyu+yQ7iVZz/fYyp0SEISdba MsEQUeuTC/owLgetuamScPoIDPpUMbfeMuL9eA2lJpk7f19g4E9vFRDVO1nCqXjZ0WpV K02g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=On5+1be7xGXjOu8LdLCeRUm3FM/QosXFIydx2PK9N+4=; b=MbT4U26ZphSVfshEJgIOiloQ/GQO+8QftlddsbwROXv6iNzs64IY9iax+jtEtd3hXO SdAweS4P9jW8RaTcrRhaHRk+ZF32E6oX65kVWMN/nlWAi3pBzbtopWL/BYfmLab+w+Y8 kvBvwyxrCf13vkzBHYIQi5j8E+UtDugufNY6O2Jj83sSzXpWUJVgcfD3DmHA1UKD1K0l 58SY7M0GrvqFI8UWjXJj08tR70C3Zsg/Isu4zDKzOc0CiYgjF2a7XYsYPsxHv89rmpag z0IV6cPpKzrRjYgYgIFAY5LLarJeCRagG5zVsggqbPvCAANWtVNgNOK5yStkaSoWrY0h LhBA== X-Gm-Message-State: ACrzQf1mcfv7TFlF8S9GCK2L/ZmgbaIyWjVtNcctYlSlLxvcKzVNAuC9 ori5aw401PAlbxpCCgccAI7IwprfrUK4qp9wLC0= X-Google-Smtp-Source: AMsMyM7LWlSOrArPSOLAylxo3ci7INUjmuLgw0rWtC3WcHCqtl2RkSDie/OUlmrU676RTwmjUbVefiOJpZq3ccVB84E= X-Received: by 2002:a17:906:8a5a:b0:781:6a01:5ccc with SMTP id gx26-20020a1709068a5a00b007816a015cccmr29141012ejc.118.1664399976321; Wed, 28 Sep 2022 14:19:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:907:98b1:b0:77f:b65e:ded3 with HTTP; Wed, 28 Sep 2022 14:19:35 -0700 (PDT) In-Reply-To: <5701a51d-76ff-240a-929c-054460841e80@gmx.com> References: <5701a51d-76ff-240a-929c-054460841e80@gmx.com> From: Mikael Magnusson Date: Wed, 28 Sep 2022 23:19:35 +0200 Message-ID: Subject: Re: RFC: expand $'' within heredocs To: Eric Cook Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 50696 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 9/28/22, Eric Cook wrote: > Hey all, > > bash 5.2[1] recently released and a change i found of interest is allowing > $'' to be expanded > within heredocs. $'' is currently the only expansion that uses the `$' > operator that doesn't > expand within heredocs(even $[] does); so i can see that edgecase being > confusing in addition > to the feature just being useful. > cat < hello$'\t'world > eof > ... $'foo' is technically a form of quoting, not expansion, so it is consistent the way it is now. Eg, there is no $ operator in play, the $' together form an operator (if you want to call it that) which begins this particular form of quotes. % cat << EOF "foo" 'foo' $'foo' EOF "foo" 'foo' $'foo' -- Mikael Magnusson