Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: add user control of hosts to complete



Hope this one's OK.

Index: Completion/User/_hosts
===================================================================
RCS file: /usr/local/cvsroot/zsh/Completion/User/_hosts,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 _hosts
--- Completion/User/_hosts	1999/09/16 11:39:44	1.1.1.3
+++ Completion/User/_hosts	1999/09/17 00:44:47
@@ -4,5 +4,8 @@
 
 : ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
 
+# Let the user add her own hosts in if she wants
+hosts=( $hostnames $hosts )
+
 _description expl host
 compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" "$expl[@]" - "$hosts[@]"



Messages sorted by: Reverse Date, Date, Thread, Author