> On Apr 24, 2022, at 3:41 PM, Oğuz <oguzismailuy...@gmail.com> wrote: > > 24 Nisan 2022 Pazar tarihinde Ángel <an...@16bits.net> yazdı: >> >> I think a shopt makes more sense. Forcing heredocs to be files although >> something legit to request, is more a caller workaround to bugs in >> called programs. >> > > https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00084.html
Oh yeah, I remember this. Here is Chet's position at the time: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00085.html Begin forwarded message: > From: Chet Ramey <chet.ra...@case.edu> > Subject: Re: Is there a way to force here-documents/strings to use temporary > files? > Date: December 20, 2020 at 3:53:32 PM EST > To: Oğuz <oguzismailuy...@gmail.com>, bug-bash <bug-bash@gnu.org> > Cc: chet.ra...@case.edu > Reply-To: chet.ra...@case.edu > > On 12/20/20 2:25 AM, Oğuz wrote: > >> So, is there any way to force here-documents to use temporary files no >> matter how long the expanded document is? If not, it would be nice if >> compat50 had this effect. > > There is not. I'm not sure that a compat setting would be appropriate for > something that is purely an implementation issue. > > There was a fairly extensive discussion that preceded this change, starting > with > > https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00073.html > > and continuing the next month (!) with > > https://lists.gnu.org/archive/html/bug-bash/2019-04/msg00007.html > > One can argue that the concerns on either side (seeking on stdin vs. > assuming that here-strings will never hit the file system) are assumptions > that should not be made, for instance > > https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00075.html > or > https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00082.html > > I decided ultimately to make the change for the most common cases, where > the amount of data passed in a here string or here document is small. But > that is simply an implementation detail; the documented semantics of here- > documents and here-strings aren't changed. > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ -- vq