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

Re: Functions/Misc/nslookup (Re: coproc tutorial (Re: questions))

Oliver Kiddle wrote:

> Bart Schaefer wrote:
> > This doesn't work for me because the real nslookup begins block-buffering
> > its output when stdout is not a tty.  Furthermore, if I type ^C while the
> > nslookup function is running, the entire shell exits.
> I've had trouble getting it to work as well which I assumed was to do
> with it not having a tty. I tried the same trick with timedc and mailx
> aswell with varying problems. Are there any tricks we can do so that the
> programs think they have a terminal because it is potentially a very
> useful idea? If we can get it to work reliably a generic function for
> the purpose as Sven suggested would be a good idea. Can anyone think of
> any other programs which it might be useful for?

How about adding a module that offers a builtin that behaves like
a mixture of `coproc' and `eval' (i.e. arguments used as by `eval',
otherwise like `coproc') but executes the stuff in a pty?

This could also support options for simplifying parsing the output (so 
that we don't have to read one character after another but instead can 
read them in blocks, making things faster).

Any portable-pty-code experts around here?


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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