From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12586 invoked from network); 5 Jun 2007 23:00:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Jun 2007 23:00:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 1193 invoked from network); 5 Jun 2007 23:00:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jun 2007 23:00:05 -0000 Received: (qmail 27206 invoked by alias); 5 Jun 2007 22:59:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23529 Received: (qmail 27196 invoked from network); 5 Jun 2007 22:59:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jun 2007 22:59:57 -0000 Received: (qmail 386 invoked from network); 5 Jun 2007 22:59:57 -0000 Received: from redoubt.spodhuis.org (HELO mx.spodhuis.org) (193.202.115.177) by a.mx.sunsite.dk with SMTP; 5 Jun 2007 22:59:54 -0000 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=; Received: by smtp.spodhuis.org with local id 1Hvi0G-000G7Q-Pm; Tue, 05 Jun 2007 22:59:52 +0000 Date: Tue, 5 Jun 2007 15:59:52 -0700 From: Phil Pennock To: Zrajm C Akfohg Cc: zsh-workers@sunsite.dk Subject: Re: zsh-4.3.2 fails to run .zcompdump when an "alias -g" is in it Message-ID: <20070605225952.GA61945@redoubt.spodhuis.org> Mail-Followup-To: Zrajm C Akfohg , zsh-workers@sunsite.dk References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --/9DWx/yDrRhgMJTb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="zcompdump-quoting.patch" 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.$$} --/9DWx/yDrRhgMJTb--