zsh-workers
 help / color / mirror / code / Atom feed
* PGP; stdin/heredoc
@ 2007-05-01  0:56 Phil Pennock
  2007-05-01 15:26 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Pennock @ 2007-05-01  0:56 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

Anyone have any preferences yay-nay about PGP-signing submitted patches?
Key is in strong-set, so there's a fair/middling chance a recipient
could verify such a signature.


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

My messing around with a zsh/ruby uses a zrb command.  I thought that
it'd be convenient if, when there are no parameters, zrb would use the
stdin as visible to the user, hence:

 % zrb <<EORUBY
 foo = { "fred" => 23, "barney" => 110 }
 foo["fred"]
 EORUBY
 % print $zrb_type ${(t)zrb_value} $zrb_value 
 FIXNUM integer 23

That works at present if the ruby commands are provided as parameters
to zrb, and handles arrays of strings; I haven't yet decided on the best
way to deal in zsh with arrays of types other than strings or what to do
to represent a cut at the point where container types are nested.
Perhaps just always stringify ...

Disclaimer: I've only modified a couple of ruby scripts before in my
life; I only picked it because it has a coherent API (unlike Perl) and
the syntax isn't whitespace-dependent, which would be "interesting" to
mix into a shell.

[-- Attachment #2: Type: application/pgp-signature, Size: 155 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PGP; stdin/heredoc
  2007-05-01  0:56 PGP; stdin/heredoc Phil Pennock
@ 2007-05-01 15:26 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2007-05-01 15:26 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-01 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-01  0:56 PGP; stdin/heredoc Phil Pennock
2007-05-01 15:26 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).