Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: _hosts, _hostports, _telnet and _socket
- X-seq: zsh-workers 7794
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: _hosts, _hostports, _telnet and _socket
- Date: Mon, 13 Sep 1999 11:09:11 +0200
- In-reply-to: "Tanaka Akira"'s message of "12 Sep 1999 12:36:25 +0900." <rsqemg4kdhi.fsf@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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 <cmd> <host>". You could make it search
the assoc array <cmd>_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 <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author