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

Re: zsh vs. ksh coproc redirection semantics



Bart Schaefer wrote:
>That doesn't address the issue of how to close the coproc input in the
>basic zsh model.  Is "coproc exit" really going to be the approved way?

That's a separate issue.  I think the best solution is tied into access
to file descriptors above 9: make the coprocess fds be 10 and 11, and
then you can do (ignoring for the moment the single digit restriction of
the syntax) "10>&- 11>&-" to close them.  ">&p" would be shorthand for
">&10", and so on.

What syntax to use for these fds is another issue altogether.  We're
seriously short of special characters, and I don't see a good syntax
that's compatible with POSIX.  (The best I see is to put ">;" preceding
the multi-digit version of the normal syntax.)  OTOH, it would probably
be reasonably easy to simply allow multi-digit fd numbers with an option,
enabled by default only in zsh mode.

-zefram



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