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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27184 invoked from network); 25 Oct 2021 19:31:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Oct 2021 19:31:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1635190297; b=pB7/RHy+2OAgxmIegQ8IoQnc10aOHn8aD5tvzgaGB9OwP6eEFXN+xo4ktT0JXdJW0HEdWYwQbr HIbMCp7yySHOrke16u4HU5nx+uWlOMGNFbEbS2tdrX2Jjb52PCMZZ2jL0DhooUWLytHJj1XYpN zv/0tnuna7Mo/bdTdzbDI7GaLrOJbSpugOme+BrxjG11uTqEf0Ws2grbqG1nhm10WuvVLFXsTE kQcKO4HJUJItjMPipipxPaqQvrIk9ygBnXEXwI3X0NwRBeZALbd4x7Zhe68boeYXLHXaSUQdoY 41c4T0CAbgVt4uErMlNNwm30/zfhSiPcIycyhns1aEJoJA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1635190297; bh=7cbQ58tq8SpXAWU0BnTE+rDnjEI3+OQr5MPIt/g2i0s=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Subject:Cc:To:From:Date:References:In-Reply-To: Message-ID:MIME-Version:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=d35vvbQ2ArswXJSlw0XErYq9kuWm1iiuE298ZVZ4COjGkitOgVvcwiqBE5NFST2NvkI+qpZt+B ExYKr0kCy7XWZv10pQ0d3KuRj0c7+anBrVkOy/0/Iq0TBY7QMxtFoQKwmBJOVYOiZIPOh/9Akm 9TWdxW/sSVT4nnboD0vQovw2mggf7Vdo2yTV5ybb6jFKI64nPYGwfNtEV9Yml3wm827MFqnXE8 A7ayH9LMSYuxoBJaMvYbLt1iLGT5yLwKSD3L6qVytIut/HQPY0fWeBeJVzpB4WeR4X2eyrqA/K 6rllwvwW4wXK+CEaQVa51RUIS6atGJz9iL25frJCa98Uzw==; 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:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id: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=6fExfw5e7EiDfdCCzQYPDEawFTyeJALEOJVdjM95Jdo=; b=SkH9VM8jxEYKfvWYnLshyD8XAF tksNGlKMCtVP49InoW7buoA8QlUJFxI597h9axAEyTmIMkq0eROK+X9fImtZNMJ3wWF0oAM48Ahql xGtmzMH78PjyTj13XNHpuUlO/LGSorPHF/FNS/KO58cV7+6zeV1LYDjHqRYlUlDWp8cjxHvpHmoO5 CdXSY2SzyIgxaY3uQqM64/FWxOFWIoIAWD+pIfIROb+xWvHnbZXuFTHjKU2BgJwf2QcMO+S8WDmYh nCgwQPAuBF8lKpzVM2zmqX3pV2AUK7Wuc2RrudXteftFZtCc+Kg37TAfbbrdwIt1YMiWNFp3hMqOy 9ltS7AxA==; Received: from authenticated user by zero.zsh.org with local id 1mf5h3-000DoK-6e; Mon, 25 Oct 2021 19:31:37 +0000 Authentication-Results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out2-smtp.messagingengine.com ([66.111.4.26]:52213) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mf5gg-000DVQ-Ce; Mon, 25 Oct 2021 19:31:16 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 009EC5C0307; Mon, 25 Oct 2021 15:31:13 -0400 (EDT) Received: from imap46 ([10.202.2.96]) by compute6.internal (MEProxy); Mon, 25 Oct 2021 15:31:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type; s=fm1; bh=6fEx fw5e7EiDfdCCzQYPDEawFTyeJALEOJVdjM95Jdo=; b=NmdEdEG2yI1rDWiOPOV4 Wb9TW5k2qugoMQLbe6DlODGyY6SnUW4Mmw39058a9rbBBu3yd9zMrbFx8OQ+MoDz rs8OD+dEK1HV9Fg4ZVar0KBfNlxcnZsePXDqG0VodhiepAssZix9RGYWI7+7260p 32lZ33dJ3ivxhbviwQ1o/HOyEgx5EiZtdXbV6L+1Ts8owEUnx4C2ct2cqnjCLLE3 vpQwQBwQZIEuY2mGZTQzIQmO9kBbliM8+hzfHFV/tQ/Zp1ayxmu5+pweBMyXf6Tx fu2RFK9m8krwTGVMsl/EYQNkkXd4klOjaZqK8zI3Gu/1M5KZTEHuok8VqILgazHR Fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=6fExfw 5e7EiDfdCCzQYPDEawFTyeJALEOJVdjM95Jdo=; b=Pw/ex6+jt5ildsqeqfrFzF OOlT8yU+zuwb/AkxZ6ANnTkm4nhWLnV9M5ukCtFQuNd3O5Zz9o1SyHcPkYF5BsBU jU3lQqdeeOHsyC3HoEk0K99LVPjE5Y7A2paMofYCX6PGUccvVlcdWg43MY6ymwsH MSR3e7bkBAJpLg/yXMl5+erw95tDOoSSe6iv/WIzMVsRgoPRUwokHmT4gNQRdUib OT4Eqhek10mHyV/cU3QaSj1mqGcyc7pYk+r/mLy66PC6zXJgwdCxanBoifT2hoii kOKeLMT66mIK8+Vo2hzKDPkD5VIZ0+JODZdhX16l9jeFF4pJZrq8GEDM8/QO13mA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfffgr nhhivghlucfuhhgrhhgrfhdfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gvqeenucggtffrrghtthgvrhhnpeejueevheeukeejtdffgeevlefhteehhfelhfffgfdu uefhtddvhefhjeekgeehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 777D61EE0079; Mon, 25 Oct 2021 15:31:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e Mime-Version: 1.0 Message-Id: <0b54c358-aa7c-47a9-9688-3379e5e2af0f@www.fastmail.com> In-Reply-To: References: <20211021143915.GD16034@tarpaulin.shahaf.local2> Date: Mon, 25 Oct 2021 19:30:52 +0000 From: "Daniel Shahaf" To: "Jett Husher" Cc: "zsh-workers@zsh.org" Subject: Re: What does REDIRF_FROM_HEREDOC flag represent? Content-Type: text/plain X-Seq: 49522 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: Jett Husher wrote on Fri, 22 Oct 2021 04:42 +00:00: > On Thursday, October 21st, 2021 at 16:39, Daniel Shahaf > wrote: >> > Is it that every line in heredoc is a here-string? >> >> No. > > I got that idea from the fact that heredoc and here-string, despite having > separate entries in redirection types enum in zsh.h, share the same case in > exec.c (line 3687) and are both acquired with getherestr function. I saw that > just above this very function is gethere fn with a comment that it converts a > heredoc to a here-string, but I thought that the flag would be set there as > well. > > I guess I just got confused and a comment from getherestr that reads "For > here-strings from here documents, we use the original" got me an idea that a > here-string can somehow exist in heredoc (?????) in a very strange fashion. So > I asked to make sure. > Thanks for explaining what derailed you. Sounds like we should add some comments to clarify what's going on. I don't immediately have a concrete proposal; anyone wants to do the honours? Thanks again, Daniel