From: Jett Husher <jetthusher@pm.me>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: What does REDIRF_FROM_HEREDOC flag represent?
Date: Fri, 22 Oct 2021 04:42:09 +0000 [thread overview]
Message-ID: <kwTbemarTcCvq0voC6-CV1Sy3G6_5FOopvKfFxJUgAd2AacXSjcYU9KZc1EbuXHnkQ6TrRMIbshoFxjr_ASlnZqGUgmKadDB7nZB-vlNWbY=@pm.me> (raw)
In-Reply-To: <vBtfA3xVArPp-qWVYvqO2koSzHro1ms6um1SMPrWwJSp-luOAzAkWH2xx7FAxaPw8IWt1uQw3PiNd0yhOfXRAMGRgSGlscm23N0CnMY1oKI=@pm.me>
On Thursday, October 21st, 2021 at 16:39, Daniel Shahaf
<d.s@daniel.shahaf.name> 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 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.
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 ☹
It's surprisingly easy to navigate in the code base, even without entirely
understanding C syntax. So good job keeping it organized!
- Jett
next prev parent reply other threads:[~2021-10-22 4:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 9:53 Jett Husher
2021-10-21 14:39 ` Daniel Shahaf
[not found] ` <vBtfA3xVArPp-qWVYvqO2koSzHro1ms6um1SMPrWwJSp-luOAzAkWH2xx7FAxaPw8IWt1uQw3PiNd0yhOfXRAMGRgSGlscm23N0CnMY1oKI=@pm.me>
2021-10-22 4:42 ` Jett Husher [this message]
2021-10-25 19:30 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='kwTbemarTcCvq0voC6-CV1Sy3G6_5FOopvKfFxJUgAd2AacXSjcYU9KZc1EbuXHnkQ6TrRMIbshoFxjr_ASlnZqGUgmKadDB7nZB-vlNWbY=@pm.me' \
--to=jetthusher@pm.me \
--cc=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).