diff options
author | Clint Adams <clint@users.sourceforge.net> | 2002-04-12 23:24:21 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2002-04-12 23:24:21 +0000 |
commit | 68615c0100b8daf0fa2e895f6834b68c0535f8cb (patch) | |
tree | 295d7921109740dd2f17ad743b0f390291606130 /Completion/Unix/Type/_hosts | |
parent | 0382f720c49aa741cecd0891c7a2e7537e206bc9 (diff) | |
download | zsh-68615c0100b8daf0fa2e895f6834b68c0535f8cb.tar.gz zsh-68615c0100b8daf0fa2e895f6834b68c0535f8cb.tar.xz zsh-68615c0100b8daf0fa2e895f6834b68c0535f8cb.zip |
16972: complete for aaaa, zone, mx, soa, txt.
Diffstat (limited to 'Completion/Unix/Type/_hosts')
-rw-r--r-- | Completion/Unix/Type/_hosts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Completion/Unix/Type/_hosts b/Completion/Unix/Type/_hosts new file mode 100644 index 000000000..a058b28da --- /dev/null +++ b/Completion/Unix/Type/_hosts @@ -0,0 +1,13 @@ +#compdef ftp ping rwho rup xping traceroute host aaaa zone mx ns soa txt + +local expl hosts + +if ! zstyle -a ":completion:${curcontext}:hosts" hosts hosts; then + (( $+_cache_hosts )) || + : ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} + + hosts=( "$_cache_hosts[@]" ) +fi + +_wanted hosts expl host \ + compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" -a hosts |