Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: add user control of hosts to complete
- X-seq: zsh-workers 7890
- From: Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: add user control of hosts to complete
- Date: Fri, 17 Sep 1999 03:46:27 +0100
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
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