Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-4.3.2 fails to run .zcompdump when an "alias -g" is in it
- X-seq: zsh-workers 23529
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Zrajm C Akfohg <zrajmc@xxxxxxxxx>
- Subject: Re: zsh-4.3.2 fails to run .zcompdump when an "alias -g" is in it
- Date: Tue, 5 Jun 2007 15:59:52 -0700
- Cc: zsh-workers@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=first1; d=spodhuis.org; h=Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=KlRNQLdlo8lMQVs02yy7QqxhyiegaxfDkGYS2T0EFs2eCwG4UnbXEhfKeV/v/5omhk998xbP9xS3olbUEB3yZSe14SF6yB63MnThaX5fbnHr0r+d1cQe3NISL/H0W3x1i621rfjfF4E+vbjahg5vPGllCSdfgh+7ExzNcZ/HJWQ=;
- In-reply-to: <loom.20070605T234624-393@xxxxxxxxxxxxxx>
- Mail-followup-to: Zrajm C Akfohg <zrajmc@xxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <loom.20070605T234624-393@xxxxxxxxxxxxxx>
On 2007-06-05 at 21:58 +0000, Zrajm C Akfohg wrote:
[ zcompdump broken ]
> Today I realized that this might have something with the global alias "cp" that
> I have. And sure enough, if I remove the line
>
> alias -g cp='cp -b'
>
> from my .zshrc the problem goes away.
> the problem goes away completely. -- Until zsh generates a new (faulty)
> .zcompdump file.
>
> Thus, zsh should generate a .zcompdump file in which the keys in all
> associative arrays are quoted, to avoid having them expanded as aliases.
Try this; fortunately, it's an easy change: the parameter expansion flag
'q' can be doubled to use single-quote quoting instead of backslash
escaping.
-Phil
Index: Completion/compdump
===================================================================
RCS file: /home/cvsroot/zsh/Completion/compdump,v
retrieving revision 1.7
diff -p -u -r1.7 compdump
--- Completion/compdump 16 Jun 2004 15:10:21 -0000 1.7
+++ Completion/compdump 5 Jun 2007 22:55:46 -0000
@@ -41,32 +41,32 @@ print "#files: $#_d_files\tversion: $ZSH
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.$$}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author