zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: add user control of hosts to complete
@ 1999-09-17  2:46 Adam Spiers
  1999-09-17  7:51 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Spiers @ 1999-09-17  2:46 UTC (permalink / raw)
  To: zsh workers mailing list

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[@]"


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: PATCH: add user control of hosts to complete
@ 1999-09-17  7:35 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-09-17  7:35 UTC (permalink / raw)
  To: zsh-workers


Adam Spiers wrote:

> Hope this one's OK.
> 
> ...
>  
>  : ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}

Hm, this assignment already makes the value the user set `hosts' to
take precedence...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-09-17 11:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-17  2:46 PATCH: add user control of hosts to complete Adam Spiers
1999-09-17  7:51 ` Peter Stephenson
1999-09-17 11:10   ` Adam Spiers
1999-09-17  7:35 Sven Wischnowsky

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