Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Where is this =(:) construct documented?
2021-06-11 14:17:08 -0500, Zach Riggle:
> It's insane, cool, and I can't find this documented anywhere. It
> creates a temporary file that is automatically deleted... but only
> after the line / expression terminates.
[...]
> What's more insane is that the temporary file will be auto-populated
> with the output of the =() construct. Where is THAT documented?
[...]
See
info zsh "Process Substitution"
Or:
https://zsh.sourceforge.io/Doc/Release/Expansion.html#Process-Substitution
That's the third form of process substitution.
ksh introduced the first two <(...) and >(...) in the 80s. zsh
added that third form in the 90s.
While A <(B) and A >(B) are IPC mechanisms in that A and B are
started concurrently and connected via a pipe (<(B) and >(B)
expand respectively to the path of the reading of a pipe and
writing end of a pipe, in A =(B), B is started first, its output
collected into a temp file, and the path of that temp file
passed to A when B has finished (and later removed when A
finishes).
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author