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 30870 invoked from network); 22 Oct 2021 04:49:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Oct 2021 04:49:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1634878142; b=e4mfIbpxJ72O/SY17vDYgR59ZsjR1+7i6uJPqa7v1togYk3/wPaThWCT3mSsJK69SEGxhynw60 FdLBQ5JtYLSHnvryfQj/NAIw86tbb0Z68+Yf1YQgjQ8T4hiJ3629fpcPRTTTfOk+zfQNcFfo5q KdT8JBSIb+0VTKOIY7m86dmXzllxGoVqEJUiJS2FR8IDLLlbvPnZX3nD2q6CciPpJF3nc0fZtv DSUt6utTicqC/5kQ5SOL0aFuRsu95OiG0qNzXPgsOo1Hn9xcQUJGL1OsRh079d/xj4MnqaXRA1 Wm4z+uq8jBnAFJc/JUxnHicW9lMO4qJLt21uJMznXLDMZA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-4316.protonmail.ch) smtp.remote-ip=185.70.43.16; dkim=pass header.d=pm.me header.s=protonmail header.a=rsa-sha256; dmarc=pass header.from=pm.me; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1634878142; bh=AicALjRN2fkGABAJmqB6H/bKYaAMGrsqkqIQQ9VZ+r0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Subject:Reply-To:Cc:From:To: DKIM-Signature:Date:DKIM-Signature; b=O+wfXKttYMo1j88FvIbxVj53pr5H1iZKHtTGKZjRQFu4mYfMVE4iZOFmFZ9M9iLtUcnfMVxzjN h7L6mYKpjhjHCT3u4ejCZhr1730kvnzFbHJqbIk88GPqRlU8/4FtXRAbFTghXeoWz7f3Sdkarp 2tDu5fmrYU9RKqrHcdvloTJD5Qz0u0t2bKrQgk2dXPZ1lrQ6r7NnKu70gMKQxYUiybhgavDjui hsG4IGIFa3zRyF8XAKWEbM9W/X4oIjcG0a6uSJgKBwICm5Q9FQ61WQnRfgKrgIPDCrEGDxJcw2 4JU8pH+c4Doc32Jn2e+8ge2Fv7BklHbZh+ts4/N+ddTWyA==; 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:MIME-Version:References:In-Reply-To:Message-ID:Subject:Reply-To: Cc:From:To:Date:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=AicALjRN2fkGABAJmqB6H/bKYaAMGrsqkqIQQ9VZ+r0=; b=GZ05SCvaAdOeTzYKuswFODQ1zy bMHxgq2IDoWhY+C0LWLsz62nw6D7sY99vLjuC8adgiVR/ohPhJymm7DtZp5dEwh7EhM5Navn9qVNm XVtdr5RclJDShECo0qSPhGx6vhgfgVgBu0XLgM2ZLZNLvHYgzS6TuMc59Z7pxNoK/4xlADlDJIw65 fGQnBKfcyRcsu7QU7f8SOJqlx/Vnpw9luA09cZ9chzUX9Tbuncc4pxcwYRIKEfEhXCvNZZZu1vIbr 6hEk9HKhTOYw5UmMF4WpW0dEkcBrXCR2+B0MbOjrFerRdYGhJQ54FEx6V1d9atOIuuJ+srowv3fp4 mcLUk/0w==; Received: from authenticated user by zero.zsh.org with local id 1mdmUH-000Nfh-Mn; Fri, 22 Oct 2021 04:49:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-4316.protonmail.ch) smtp.remote-ip=185.70.43.16; dkim=pass header.d=pm.me header.s=protonmail header.a=rsa-sha256; dmarc=pass header.from=pm.me; arc=none Received: from mail-4316.protonmail.ch ([185.70.43.16]:46227) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mdmNf-000N7T-5c; Fri, 22 Oct 2021 04:42:11 +0000 Date: Fri, 22 Oct 2021 04:42:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634877730; bh=AicALjRN2fkGABAJmqB6H/bKYaAMGrsqkqIQQ9VZ+r0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=o5WnSumeNZjlX6aSbtTpSwUxGIFErsBo2MC6U9Yk+55oblo9Sm40oZQaXm5gwsYzv psi3OzzQ/1Izh/zaiWUmqb/EpibqVzw88cy99f0AFnSVjsGw7aqJY/DbyWXsOT3PfB f3LpszpK5AedjXkxQmmr5SXxMXoc4wQ6mbFpZkSRofHGmPidt885JhZuHDEZJB4Stp yL+bheftN4I7CJBjlwV1MxYjZI80j3ZRE89dm79U/ofueZtFaOEVBqxLaHA/xAXxB+ qCZerCGdLxi2U4OXD5Ddbj3B6mb22CtVJComx4Yn2BZRFt8jbzbIKhJ9hFF1r0qKgz miHjKGPaMqPGQ== To: Daniel Shahaf From: Jett Husher Cc: "zsh-workers@zsh.org" Reply-To: Jett Husher Subject: Re: What does REDIRF_FROM_HEREDOC flag represent? Message-ID: In-Reply-To: References: <20211021143915.GD16034@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 49510 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 Thursday, October 21st, 2021 at 16:39, Daniel Shahaf wrote: > Welcome :) Thanks! c: > > 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 th= at 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. Your explanation definitely helped, thank you a ton for that, Daniel! > It did help that I already knew what each file does in general, but > yeah, I don't have access to zsh-with-comments.git either =E2=98=B9 It's surprisingly easy to navigate in the code base, even without entirely understanding C syntax. So good job keeping it organized! - Jett