From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16090 invoked from network); 12 Sep 1999 03:36:45 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Sep 1999 03:36:45 -0000 Received: (qmail 7578 invoked by alias); 12 Sep 1999 03:36:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7781 Received: (qmail 7571 invoked from network); 12 Sep 1999 03:36:27 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: _hosts, _hostports, _telnet and _socket References: <990912022006.ZM18909@candle.brasslantern.com> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 12 Sep 1999 12:36:25 +0900 In-Reply-To: "Bart Schaefer"'s message of "Sun, 12 Sep 1999 02:20:05 +0000" Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article <990912022006.ZM18909@candle.brasslantern.com>, "Bart Schaefer" writes: > This doesn't seem sensible to me at all. What are you supposed to do, > repeat every host name for every port to which you might want to telnet? Yes. Since it is rare case to specify a port, I suppose that it will not be big problem. But... > IMO it'd be more useful to leave $hosts as it was and create an AA that > maps a host name to a space-separated list of ports -- and then maybe > even to have one such AA for each command that accepts a port number, > as it's unlikely that one wants to complete the same port numbers for > e.g. "pine -f ..." as one does for "telnet". Definitely this is better way to specify the relation between hosts and ports. So, I modified `_hosts', `_socket' and `_telnet'. `_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.) After applying the patch, you should remove `Completion/User/_hostports'. Index: Completion/User/_hosts =================================================================== RCS file: /projects/zsh/zsh/Completion/User/_hosts,v retrieving revision 1.1.1.12 diff -u -F^( -r1.1.1.12 _hosts --- _hosts 1999/09/12 00:02:40 1.1.1.12 +++ _hosts 1999/09/12 03:34:11 @@ -5,4 +5,4 @@ : ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(