zsh-users
 help / color / mirror / code / Atom feed
From: mason@primenet.com.au (Geoff Wing)
To: zsh-users@math.gatech.edu
Subject: Re: how can i get lynx news:<special newsgroup> done?
Date: 6 Nov 1997 08:16:28 GMT	[thread overview]
Message-ID: <slrn662v6r.em1.mason@coral.primenet.com.au> (raw)
In-Reply-To: <9710291450.AA16230@rzaix41.rrz.uni-hamburg.de>

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


      reply	other threads:[~1997-11-06  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-29 14:50 fk5a005
1997-11-06  8:16 ` Geoff Wing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrn662v6r.em1.mason@coral.primenet.com.au \
    --to=mason@primenet.com.au \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).