From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4080 invoked from network); 13 Sep 1999 09:09:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Sep 1999 09:09:26 -0000 Received: (qmail 27735 invoked by alias); 13 Sep 1999 09:09:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7794 Received: (qmail 27728 invoked from network); 13 Sep 1999 09:09:13 -0000 Message-Id: <199909130909.LAA14546@paris.ifh.de> X-Authentication-Warning: paris.ifh.de: pws owned process doing -bs To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: PATCH: _hosts, _hostports, _telnet and _socket In-reply-to: "Tanaka Akira"'s message of "12 Sep 1999 12:36:25 +0900." Date: Mon, 13 Sep 1999 11:09:11 +0200 From: Peter Stephenson Tanaka Akira wrote: > `_telnet' uses AA named `telent_ports' to complete hosts and ports --- > keys for hosts and (word splitted) values for ports. > (If the host completion is failed, `_hosts' is called.) Just some random ideas. I'd have said there was room for an autoloaded function _ports, which can use telnet_ports and then default to something like awk '/^[a-z]/ { print $1 }' /etc/services if nothing turns up. As Bart implied, it might be useful to have it index on commands, too: you could have the convention, say, that commands had a trailing * added (quoted, obviously). Then _ports could be called like "_ports ". You could make it search the assoc array _ports, which is sort of what's happening with telnet_ports and socket_ports. In that case indexing on commands is perhaps superflous and you could have a special key (e.g. '*') giving a default port. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy