Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Hosts completion
- X-seq: zsh-workers 6721
- From: "Kiddle, Oliver" <KiddleO@xxxxxxxxxx>
- To: "'zsh-workers@xxxxxxxxxxxxxx'" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Hosts completion
- Date: Fri, 18 Jun 1999 19:05:48 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Following is a replacement for the hosts completion. I've added an initial
line which attempts to set $hosts if it isn't already and I've added
matching control: host names are not case-sensitive so should be treated as
such and it's useful if '.' is treated as special like '/' in path names.
I've also added telnet and xhost to the list of commands to work on.
Host names isn't the perfect completion for them but they haven't got a
better completion yet.
Oliver Kiddle
#compdef ftp ncftp ping rwho rup xping traceroute nslookup telnet xhost
: ${(A)hosts:=${${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[\t ]#[^\t
]#}}}}
compgen -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' -k hosts
Messages sorted by:
Reverse Date,
Date,
Thread,
Author