Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Undocumented construct <<(

On Wed, 18 Nov 2015 14:41:47 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:

> On Wed, 18 Nov 2015 15:23:08 +0100
> Klaus Ethgen <Klaus+zsh@xxxxxxxxx> wrote:
> > I searched now pretty long for a undocumented construct <<(list).
> What you're looking at is a normal < followed by a <(list),
> i.e. redirect stdin from <(list).

and while I'm sending more emails than necessary, here's a note in the
process substitution documentation.


diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 123722e..564c70d 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -410,6 +410,12 @@ are only expanded when first parsing command or assignment arguments.
 Process substitutions may be used following redirection operators; in this
 case, the substitution must appear with no trailing string.
+Note that `tt(<<LPAR())var(list)tt(RPAR())' is not a special syntax; it
+is equivalent to `tt(< <LPAR())var(list)tt(RPAR())', redirecting
+standard input from the result of process substitution.  Hence all
+the following documentation applies.  The second form (with the space)
+is recommended for clarity.
 In the case of the tt(<) or tt(>) forms, the shell runs the commands in
 var(list) as a subprocess of the job executing the shell command line.
 If the system supports the tt(/dev/fd)

Messages sorted by: Reverse Date, Date, Thread, Author