Thanks for the feedback, Eduardo-- On Mon 2019-03-18 17:40:17 -0700, Eduardo A. Bustamante López wrote: > I don't think the implementation details of herestrings are documented > anywhere, > and I'm not too sure if they should (i.e. IMO if you need that degree of > control > over the implementation details, then you should use something other than > shell).
I hear you in general -- i also don't want the documentation to be as detailed as the source code. But casually sending ephemeral data to disk is a risk that i think ought to be avoided or at least avoidable. If bash was in the habit of writing the environment to disk, i think users would rightly complain. > Having said that, have you tried process substitution as an option? sure, that's an option (as long as process substitution is enabled on the platform -- apparently that's not universal either). Also possible (for stdin in particular) is sending data via a pipeline using bash builtins. Both of these require users of bash to rewrite their scripts though. It seems like it'd be preferable for the shell itself to avoid these problems automatically, at least on platforms where it's possible to do so. Otherwise, we *require* users of the shell to know which things are "safe" and which things aren't before they can use the shell safely. --dkg