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

Re: PGP; stdin/heredoc



On Apr 30,  5:56pm, Phil Pennock wrote:
} 
} Anyone have any preferences yay-nay about PGP-signing submitted patches?

No particular preference.  Many readers of this mailing list (at least
in the past) have preferred that there be no MIME attachments or other
MIME-multipart messages; unless the patch is really large, keep it in
plain text in the message body, use text/plain not text/x-patch or some
other weird type if you must attach it, and don't sign with S/MIME.

} For builtin/module commands, is there a real facility for
} being able to get at the virtual stdin provided which supports
} heredoc/herestring/etc?

I'm not sure what you mean, or why you care.  Unless you're adding a
syntactic construct rather than just a builtin command, the virtual
stdin is indistinguishable from real stdin by the time control has
transferred from the parser to your module.  The here-document is
copied to a temporary file and the descriptor for that file is dup'd
to stdin, THEN zrb is called.

So presumably you could get at the virtual stdin by doing fstat() or
some such on fd 0, or isatty(0) or (in a function) [[ -t 0 ]] may give
you enough information to decide to change behavior.



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