Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Expanding interactively aliases

Oliver Kiddle wrote:

> ...
> My real point is that the existing _expand appears to be expanding global
> aliases already. I wouldn't have expected this because -U is used when
> autoloading _expand. A quick check reveals that this is with the
> substitute style and is due to the fact that the aliases are expanded
> within eval.

Now that you say that... I seem to have a very faint memory of a
discussion about this (not in _expand, I think, we had the problem
somewhere else). I think we found a solution which I can't think of
now and I don't know where to search for it either.

And the maling list archive seems to be defunct -- I always get zero
metches no matter what I'm searching for.

Hm. Anyone else remember this?

> I don't think it is ideal that autoload -U functions are subject to
> aliases within eval and you could probably break a few bits of completion
> with certain global aliases. Would it be easy to avoid this somehow? The
> other solution would be a -U argument to eval which probably isn't a great
> idea because eval currently takes no options.

That aliases-inside--U-functions isn't that easy, I think (and there
may be cases where the function wants to have them expanded but the
user loaded it with -U, without thinking about this side-effect).


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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