From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Zrajm C Akfohg <zrajmc@gmail.com>
Cc: zsh-workers@sunsite.dk
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 [thread overview]
Message-ID: <20070605225952.GA61945@redoubt.spodhuis.org> (raw)
In-Reply-To: <loom.20070605T234624-393@post.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
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
[-- Attachment #2: zcompdump-quoting.patch --]
[-- Type: text/x-diff, Size: 1734 bytes --]
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.$$}
next prev parent reply other threads:[~2007-06-05 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 21:58 Zrajm C Akfohg
2007-06-05 22:59 ` Phil Pennock [this message]
2007-06-06 8:56 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070605225952.GA61945@redoubt.spodhuis.org \
--to=zsh-workers+phil.pennock@spodhuis.org \
--cc=zrajmc@gmail.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).