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



Phil Pennock wrote:
> > 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.

I've committed this, but in principle you can have a global alias for
anything, even a quoted expression; it might be better to have the shell
save and restore the state of the noaliases option for the dumpfile,
something like:


integer aliases
{
[[ -o aliases ]] && aliases=1
setopt noaliases

...

} always {
  (( aliases )) && setopt aliases
}


It's a pity this isn't easier in a dot file.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



Messages sorted by: Reverse Date, Date, Thread, Author