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

Re: Aliasing separators (Re: grammar triviality with '&&')



On Mon, 9 Mar 2015 12:46:29 +0100
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> On 2015-03-07 13:10:08 -0800, Bart Schaefer wrote:
> > Actually, that helped me to put some sort of explanation around my
> > intuition of how aliasing should work:
> > 
> >  A token may be expanded as an alias only if doing so cannot change the
> >  lexical interpretation of any tokens that may appear adjacent to it.
> > 
> > This emphasizes that "{this" expanding to "{ foothis" in the example at
> > the tail of my previous message, is a bug: The interpretation of "this"
> > has been changed, and the internal inconsistency is manifest when you
> > examine what has been stored in the history.
> 
> Can't this be solved by adding a space during alias expansion?

What happens to white space certainly seems to be central to the things
Bart is most worried about --- both what goes into and what comes out of
the alias.  Possibly soluble with enough checks and management of
token expansion.  Are we motivated enough to look into the necessary
code to improve this?  We still have the option of backing it off
before anyone outside the mailing list notices.

("We" mostly meaning the people doing the work, which for present
purposes means Bart and me.  People not doing any work are much
more easily motivated :-/)

pws



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