zsh-users
 help / color / mirror / code / Atom feed
* how can i get lynx news:<special newsgroup> done?
@ 1997-10-29 14:50 fk5a005
  1997-11-06  8:16 ` Geoff Wing
  0 siblings, 1 reply; 2+ messages in thread
From: fk5a005 @ 1997-10-29 14:50 UTC (permalink / raw)
  To: zsh-users

i sometimes love to view only a few new mails in a newsgroup.
then i take my lynx and let it view the newsserver with a special
newsgroup.

only the newsgroup should be a variable. because i read many newsgroups.

lynx news:<variable>

<variable> should be completed.

say, i wanted to search for unix in newsgroup-names with the script below:.

cat ~/..nn/ACTIVE | cut -d  ' ' -f1 | grep $1

now i want zsh to complete all found unix-newsgroups for me to choose from.
and then invoke lynx news:<all-unix-newsgroups to choose from>

anyone here, who has a solution?
i simply do not get it.
i think, -P "news:" should be there with compctl, the rest i am not sure.
I only think , i need a function which should be completed somehow.


please help me!

-- 

Matthias


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

* Re: how can i get lynx news:<special newsgroup> done?
  1997-10-29 14:50 how can i get lynx news:<special newsgroup> done? fk5a005
@ 1997-11-06  8:16 ` Geoff Wing
  0 siblings, 0 replies; 2+ messages in thread
From: Geoff Wing @ 1997-11-06  8:16 UTC (permalink / raw)
  To: zsh-users

fk5a005@rrz.uni-hamburg.de <fk5a005@rrz.uni-hamburg.de> typed:
:i sometimes love to view only a few new mails in a newsgroup.
:then i take my lynx and let it view the newsserver with a special
:newsgroup.
:only the newsgroup should be a variable. because i read many newsgroups.
:lynx news:<variable>
:<variable> should be completed.
:say, i wanted to search for unix in newsgroup-names with the script below:.
:cat ~/..nn/ACTIVE | cut -d  ' ' -f1 | grep $1
:now i want zsh to complete all found unix-newsgroups for me to choose from.
:and then invoke lynx news:<all-unix-newsgroups to choose from>
:anyone here, who has a solution?
:i simply do not get it.
:i think, -P "news:" should be there with compctl, the rest i am not sure.
:I only think , i need a function which should be completed somehow.

OK, it's been about a week and nobody has answered yet.  Please note that
I'm probably one of the lesser qualified to answer this as there are several
(very quiet or very busy or very lazy) compctl gurus around.  Here's a 
starting point.  Note that I've been lazy and left it to you to tidy it up.
eg.  ``lynx ne<TAB>'' won't work properly because "ne" won't be stripped out
in the second line of getgroups(), so you'll get all matches for ``ne''.

getgroups() {
   local v="$1$2"
   v=${v:s#news:##}
   reply=( $(cut -d' ' -f1 < ~/..nn/ACTIVE | fgrep "$v") )
}

compctl -U -P 'news:' -K getgroups - lynx

-- 
Geoff Wing [gcw@pobox.com]                         Phone    : +61-3-9818 2977
 Technical Manager: PrimeNet Computer Consultants  Facsimile: +61-3-9818 5155
 Web: <URL:http://primenet.com.au/>                Mobile   : 0412 162 441


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

end of thread, other threads:[~1997-11-06  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-29 14:50 how can i get lynx news:<special newsgroup> done? fk5a005
1997-11-06  8:16 ` Geoff Wing

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).