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

Re: PATCH: make _urls magicequalsubst aware



On Jun 18,  3:34am, Tanaka Akira wrote:
} Subject: PATCH: make _urls magicequalsubst aware
}
} Hm.  `g:=glob' should be quoted.

That's indirectly my fault.  I wondered aloud why it was quoted, and so
the next patch unquoted it.

However, that's surely a bug in magicequalsubst handling:

MAGIC_EQUAL_SUBST
     All unquoted arguments of the form `ANYTHING=EXPRESSION' appearing
     after the command name have filename expansion (that is, where
     EXPRESSION has a leading `~' or `=') performed on EXPRESSION as if
     it were a parameter assignment.  The argument is not otherwise
     treated specially; it is passed to the command as a single
     argument, and not used as an actual parameter assignment.  For
     example, in echo foo=~/bar:~/rod, both occurrences of ~ would be
     replaced.  Note that this happens anyway with typeset and similar
     statements.

g:=glob should have ANYTHING of `g:' and EXPRESSION of `glob'.  There's
no expansion to be peformed on `glob'.  How is the `=' getting taken to
be part of the EXPRESSION?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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