zsh-workers
 help / color / mirror / code / Atom feed
* Hosts completion
@ 1999-06-18 18:05 Kiddle, Oliver
  0 siblings, 0 replies; only message in thread
From: Kiddle, Oliver @ 1999-06-18 18:05 UTC (permalink / raw)
  To: 'zsh-workers@sunsite.auc.dk'

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-06-18 18:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-18 18:05 Hosts completion Kiddle, Oliver

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).