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 23530
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zrajm C Akfohg <zrajmc@xxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: zsh-4.3.2 fails to run .zcompdump when an "alias -g" is in it
- Date: Wed, 06 Jun 2007 09:56:28 +0100
- In-reply-to: <20070605225952.GA61945@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <loom.20070605T234624-393@xxxxxxxxxxxxxx> <20070605225952.GA61945@xxxxxxxxxxxxxxxxxxxx>
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