summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-06-06 08:49:48 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-06-06 08:49:48 +0000
commitafd3e16fec6b3778a74cfcc34619e312f58cd532 (patch)
treeef92b78496bd786cc011cd8b6fdea1016d3a9cd4
parent2291ffb70dff8e0bdb72ab532c64e6dfa9c4bab4 (diff)
downloadzsh-afd3e16fec6b3778a74cfcc34619e312f58cd532.tar.gz
zsh-afd3e16fec6b3778a74cfcc34619e312f58cd532.tar.xz
zsh-afd3e16fec6b3778a74cfcc34619e312f58cd532.zip
23529: quote completion dump to prevent global alias expansion
-rw-r--r--ChangeLog5
-rw-r--r--Completion/compdump12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ebc1347eb..f039ae733 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-06  Peter Stephenson  <pws@csr.com>
+
+	* Phil Pennock: 23529: Completion/compdump: quote completion dump
+	to prevent global alias expansion.
+
 2007-06-05  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Completion/Unix/Command/_units: message and tag were
diff --git a/Completion/compdump b/Completion/compdump
index 7b43a2668..b3476086c 100644
--- a/Completion/compdump
+++ b/Completion/compdump
@@ -41,32 +41,32 @@ print "#files: $#_d_files\tversion: $ZSH_VERSION" > $_d_file
 
 print "\n_comps=(" >> $_d_file
 for _d_f in ${(ok)_comps}; do
-  print -r - "${(q)_d_f}" "${(q)_comps[$_d_f]}"
+  print -r - "${(qq)_d_f}" "${(qq)_comps[$_d_f]}"
 done >> $_d_file
 print ")" >> $_d_file
 
 print "\n_services=(" >> $_d_file
 for _d_f in ${(ok)_services}; do
-  print -r - "${(q)_d_f}" "${(q)_services[$_d_f]}"
+  print -r - "${(qq)_d_f}" "${(qq)_services[$_d_f]}"
 done >> $_d_file
 print ")" >> $_d_file
 
 print "\n_patcomps=(" >> $_d_file
 for _d_f in ${(ok)_patcomps}; do
-  print -r - "${(q)_d_f}" "${(q)_patcomps[$_d_f]}"
+  print -r - "${(qq)_d_f}" "${(qq)_patcomps[$_d_f]}"
 done >> $_d_file
 print ")" >> $_d_file
 
 _d_tmp="_postpatcomps"
 print "\n_postpatcomps=(" >> $_d_file
 for _d_f in ${(ok)_postpatcomps}; do
-  print -r - "${(q)_d_f}" "${(q)_postpatcomps[$_d_f]}"
+  print -r - "${(qq)_d_f}" "${(qq)_postpatcomps[$_d_f]}"
 done >> $_d_file
 print ")" >> $_d_file
 
 print "\n_compautos=(" >> $_d_file
 for _d_f in "${(ok@)_compautos}"; do
-  print -r - "${(q)_d_f}" "${(q)_compautos[$_d_f]}"
+  print -r - "${(qq)_d_f}" "${(qq)_compautos[$_d_f]}"
 done >> $_d_file
 print ")" >> $_d_file
 
@@ -129,7 +129,7 @@ done
 print >> $_d_file
 
 print "typeset -gUa _comp_assocs" >> $_d_file
-print "_comp_assocs=( ${(q)_comp_assocs} )" >> $_d_file
+print "_comp_assocs=( ${(qq)_comp_assocs} )" >> $_d_file
 
 mv $_d_file ${_d_file%.$HOST.$$}