Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What does REDIRF_FROM_HEREDOC flag represent?
- X-seq: zsh-workers 49522
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: "Jett Husher" <jetthusher@xxxxx>
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: What does REDIRF_FROM_HEREDOC flag represent?
- Date: Mon, 25 Oct 2021 19:30:52 +0000
- Archived-at: <https://zsh.org/workers/49522>
- In-reply-to: <kwTbemarTcCvq0voC6-CV1Sy3G6_5FOopvKfFxJUgAd2AacXSjcYU9KZc1EbuXHnkQ6TrRMIbshoFxjr_ASlnZqGUgmKadDB7nZB-vlNWbY=@pm.me>
- List-id: <zsh-workers.zsh.org>
- References: <UNGkzCHSmvNpdTsMVzHx7jyFHTT7l5Q2e_dT34ii2CHlMkkGkta1DEACUzRXldhBDR1aLOdMnFp9B4IO_0PQYswtcqjyDwkQEVdp3PwZqvQ=@pm.me> <20211021143915.GD16034@tarpaulin.shahaf.local2> <vBtfA3xVArPp-qWVYvqO2koSzHro1ms6um1SMPrWwJSp-luOAzAkWH2xx7FAxaPw8IWt1uQw3PiNd0yhOfXRAMGRgSGlscm23N0CnMY1oKI=@pm.me> <kwTbemarTcCvq0voC6-CV1Sy3G6_5FOopvKfFxJUgAd2AacXSjcYU9KZc1EbuXHnkQ6TrRMIbshoFxjr_ASlnZqGUgmKadDB7nZB-vlNWbY=@pm.me>
Jett Husher wrote on Fri, 22 Oct 2021 04:42 +00:00:
> On Thursday, October 21st, 2021 at 16:39, Daniel Shahaf
> <d.s@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author