[PATCH] add positional arguments to non-shell aliases

Alexander Solovyov alexander at solovyov.net
Tue May 3 16:57:10 CDT 2011


On Tue, May 3, 2011 at 23:50, Matt Mackall <mpm at selenic.com> wrote:
>> > Also that says:
>> >
>> >  Platforms: Unix
>> >
>> > which is probably a show-stopper.
>>
>> This function is basically really simple and all it does is just
>> escapes parameters properly. Would it be enough to put it in a patch
>> as well? It's like 10+ lines:
>
> Probably. This is just to build something we can later pass to shlex,
> right?

Right, I actually naïvely thought at some point in history that a
repr() will be sufficient, and it almost works, except for escape
characters (obviously). And the actual implementation could be
better/faster than pipes.quote, of course, at least it can use some
regular expression/list comprehension love.

-- 
Alexander


More information about the Mercurial-devel mailing list