about summary refs log tree commit diff
path: root/Completion/User/_hosts
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_hosts')
-rw-r--r--Completion/User/_hosts6
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/User/_hosts b/Completion/User/_hosts
index 911cea03b..a0aca0a62 100644
--- a/Completion/User/_hosts
+++ b/Completion/User/_hosts
@@ -1,3 +1,5 @@
-#compdef ftp ncftp ping rwho rup xping traceroute nslookup
+#compdef ftp ncftp ping rwho rup xping traceroute nslookup telnet
 
-compgen -k hosts
+: ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
+
+compgen -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' -k hosts