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

Re: Final demise of alias stack



> > (Note that this mechanism only expands one level of aliases:  if the
> > resulting alias is itself an alias it will not be expanded.  I have
> > kept this, but is it a bug?)
> 
> Peter,  I haven't tried the patch yet, but are you saying that
> 
> alias ls='/usr/local/bin'
> alias ll='ls -l'
> 
> won't expand all the way?  Is that right?

Sorry, I phrased that a bit loosely.  The remark only applied to aliases
which end in space and are therefore supposed to force alias expansion
on the next word.  In other words,

% alias foo='echo foo1 '
% alias bar=foo
% alias rod=bar
% foo rod
foo1 bar

the foo forces rod to be expanded, but only as far as bar; the bar does
not get expanded to foo.  This is the behaviour at least as far back as
2.5.0 and no-one has complained, but I suspect it's an oversight rather
than a feature and I'd be happy to try and fix it.

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



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