* no_glob_subst fix for _hosts
@ 1999-12-17 16:33 Adam Spiers
0 siblings, 0 replies; only message in thread
From: Adam Spiers @ 1999-12-17 16:33 UTC (permalink / raw)
To: zsh workers mailing list
Completion/User/_hosts has problems if /etc/hosts contains globbing
characters (e.g. `#', which is quite common).
It would be nice to get rid of _cache_hosts and use zstyle, but I
haven't had time to learn all the details yet.
Index: _hosts
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_hosts,v
retrieving revision 1.1.1.20
diff -u -r1.1.1.20 _hosts
--- _hosts 1999/12/10 14:47:58 1.1.1.20
+++ _hosts 1999/12/17 16:29:54
@@ -4,7 +4,7 @@
if ! zstyle -a ":completion${curcontext}:hosts" hosts hosts; then
(( $+_cache_hosts )) ||
- : ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
+ : ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
hosts=( "$_cache_hosts[@]" )
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-12-17 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-17 16:33 no_glob_subst fix for _hosts Adam Spiers
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).