Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155525 - zsh-4.3.2 fails to run .zcompdump when an "alias -g" is in it
Summary: zsh-4.3.2 fails to run .zcompdump when an "alias -g" is in it
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Torsten Veller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-17 15:05 UTC by Zrajm C Akfohg
Modified: 2008-03-26 13:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zrajm C Akfohg 2006-11-17 15:05:06 UTC
A couple of zsh versions ago I started to sometimes get the following error message each time I opened up a new (z)shell:

    /home/zrajm/.zcompdump:3: bad set of key/value pairs for associative array

And after this message, all tab completion stops working in that shell. Once the problem has appeared, all new shells get the exact same symptoms. If I erase the ~/.zcompdump file, however, the shell I start after that will work just fine (but start a little slow, since it is generating a new .zcompdump). Upon starting a new shell after that, though, the problem is back.

I.e. *all* shells which source an existing .zcompdump show this problem.

At the time I did some experimenting, and found that if I removed the line "cp _cp" inside the associative array assignment of _comps the problem I had went away.

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.

HOWEVER instead of removing the alias, I can also edit the .zcompdump file, quoting the word "cp" on the faulty line. Replacing the

   cp _cp

line, with

   'cp' _cp

If I do so 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.
Comment 1 Bapt 2008-01-03 13:39:23 UTC
Could you confirm this bug in zsh-4.3.4-r1 ? (~arch)
Comment 2 Bapt 2008-01-10 14:51:33 UTC
zsh-4.3.4-r1 is now stable could reproduce your bug, I use plenty of alais -g and never your bug, I'm using zsh-4.3.3-r1 for a long time now.
Comment 3 Torsten Veller (RETIRED) gentoo-dev 2008-03-26 13:53:54 UTC
Please reopen if the problem still exists in later versions.
Thanks.