#253794 Make <(..) work for shell scripts

Package:
zsh
Source:
zsh
Description:
shell with lots of features
Submitter:
Date:
2013-11-08 01:51:05 UTC
Severity:
wishlist
#253794#5
Date:
2004-06-11 06:54:13 UTC
From:
To:
Example:

	% mailstat <(zcat .procmail.log.1.gz)
	Can't find your LOGFILE=/proc/self/fd/11

The error message comes from mailstat, which is a shell script.  Zsh
passes /proc/self/fd/11 to mailstat, which is only meaningful for the
instance of /bin/sh that executes the script, not for any commands it
executes.

Probably the pid of the executed program should be substituted instead
of 'self', so that any children of the executed program can also get
the correct input.

#253794#10
Date:
2004-06-11 16:42:48 UTC
From:
To:
I don't know if I'm understanding this correctly.  How is zsh going to
know the pid of the program before it's executed?

You could do something like

% mailstat =(zcat .procmail.log.1.gz)

but since mailstat is such an unfriendly program, you'll end up with
files like /tmp/zshwGUbyH.old

#253794#15
Date:
2004-06-11 17:43:18 UTC
From:
To:
Clint Adams wrote:

Theoretically it's possible if you fork off first, then do the
substitutions, then execute the program.  I don't know what the
current sequence of events is in zsh, but I can imagine it'd be pretty
hard.

Indeed, which is why <(..) would be such a nice solution.


	Ivo

#253794#22
Date:
2009-01-01 20:49:58 UTC
From:
To:
Hi Ivo,

I am not sure if your request[1] can ever be fulfilled. Would
it be OK if I closed it as wontfix?
Alternatively, I can forward this to upstream, but I am
swamping them with email anyway and I don't think they
have the manpower to do this...


Richard

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=253794