zsh-users
 help / color / mirror / code / Atom feed
* Re: coproc tutorial (Re: questions)
@ 1999-10-12  6:53 Sven Wischnowsky
  1999-10-12  8:42 ` Thomas Köhler
  0 siblings, 1 reply; 11+ messages in thread
From: Sven Wischnowsky @ 1999-10-12  6:53 UTC (permalink / raw)
  To: zsh-users


Thomas Koehler wrote:

> > 3.1.6-pws-something (at least the latest pws-6) has Functions/Misc/nslookup
> > which uses `vared' to read the user input, thus allowing command line
> > editing. Together with the new completion system this function will
> > also give you completion *inside* nslookup (and not only nslookup's
> > arguments).
> 
> Now this is really cool... how do I enable this? :-)

Well, new style completion with the usual call to `compinit' (after
autoloading and things), and then just make `nslookup' autoloaded and
call it. For my version of `nslookup' here, it works, but as Bart
mentioned in 2668, it doesn't work everywhere (and I don't feel like
spending more time trying to improve the beast, it was mainly a hack
to show how the `compcontext' parameter can be used).

> > To workers: seems like noone found this interesting enough to improve
> > the code I hacked up. Maybe sometime we could write a generic function 
> > for this task...
> 
> Allowing completion from within all stdin/stdout-bound programs?
> ncftp -L is a candidate here, amongst others...

;-) there are may of them...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: coproc tutorial (Re: questions)
@ 1999-10-11 10:45 Sven Wischnowsky
  1999-10-11 12:55 ` Thomas Köhler
  0 siblings, 1 reply; 11+ messages in thread
From: Sven Wischnowsky @ 1999-10-11 10:45 UTC (permalink / raw)
  To: zsh-users


Chris Hansen wrote:

> #!/bin/zsh -i
> 
> coproc /usr/bin/nslookup
> 
> while true; do
> 	TEST=">"
> 	NSLOUT=" "
> 	while [[ $TEST != $NSLOUT ]] ; do
> 		print -n $NSLOUT
> 		read -pk NSLOUT
> 	done
> 	read 'QUERY?>'
> 	print -p $QUERY
> done

3.1.6-pws-something (at least the latest pws-6) has Functions/Misc/nslookup
which uses `vared' to read the user input, thus allowing command line
editing. Together with the new completion system this function will
also give you completion *inside* nslookup (and not only nslookup's
arguments).

To workers: seems like noone found this interesting enough to improve
the code I hacked up. Maybe sometime we could write a generic function 
for this task...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: coproc tutorial (Re: questions)
@ 1999-10-04 16:10 Jay Sekora
  1999-10-04 18:42 ` Bart Schaefer
  0 siblings, 1 reply; 11+ messages in thread
From: Jay Sekora @ 1999-10-04 16:10 UTC (permalink / raw)
  To: zsh-users

It seems a little bit non-orthoganal that you can only have one
coprocess.  (And I think that probably defeats some of the potential
value of coprocesses, which otherwise would let multiple background
pipelines communicate with each other in arbitrarily complex ways.  Has
anybody thought about the possibility of adding support for multiple
coprocesses to some misty future version of zsh?  Or am I missing the
point of supporting a coprocess?  (Entirely plausible, since I've never
used them.)

-j.


^ permalink raw reply	[flat|nested] 11+ messages in thread
* questions
@ 1999-10-03  8:30 Chris Hansen
  1999-10-03 11:10 ` questions Stefan Berglund
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Hansen @ 1999-10-03  8:30 UTC (permalink / raw)
  To: zsh-users

Hello,

I'm new to the list, I've been playing with zsh off and on for about a
year, love it.

3 questions:

1.  I'm currently using 3.0.5, from the tone of the list it sounds
like most of you would recommend an upgrade to 3.1.6, how stable is
it?  what's different?(readers digest version, promise to RTFM later)

2.  I'd like to use the lovely command line environment in other
programs the same way you use ile or fep, is there a way to do that?

3.  Could someone show me an example using coproc, the otherwise excellent
documentation is a bit weak in that area.

Thanks in advance,
Chris


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

end of thread, other threads:[~1999-10-12  8:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-12  6:53 coproc tutorial (Re: questions) Sven Wischnowsky
1999-10-12  8:42 ` Thomas Köhler
  -- strict thread matches above, loose matches on Subject: below --
1999-10-11 10:45 Sven Wischnowsky
1999-10-11 12:55 ` Thomas Köhler
1999-10-04 16:10 Jay Sekora
1999-10-04 18:42 ` Bart Schaefer
1999-10-03  8:30 questions Chris Hansen
1999-10-03 11:10 ` questions Stefan Berglund
1999-10-03 18:45   ` coproc tutorial (Re: questions) Bart Schaefer
1999-10-03 21:08     ` Chris Hansen
1999-10-04  2:01       ` coproc Chris Hansen
1999-10-04  4:41         ` coproc tutorial (Re: questions) Bart Schaefer
1999-10-04  5:21           ` Chris Hansen
1999-10-04  6:22             ` 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).