|
From: | Dan Craig |
Subject: | Re: [Fab-user] contrib.files comment and uncomment behaving differently |
Date: | Mon, 8 Nov 2010 13:20:03 -0500 |
On Mon, Nov 8, 2010 at 10:34 AM, Dan Craig <address@hidden> wrote:That would be my guess -- I'd bet most people using those functions
> In my
> use case, it's still awkward to do the replace(r"\/", "/"), but I may be
> unusual in passing a fully escaped string.
don't have regexes in the actual strings being commented/uncommented.
Though it's certainly understandable given how many config, etc files
have regexes in them.
Escaping/quoting in general has been a big pain with Fabric, since we
> Perhaps the built-in escaping in
> sed() should only escape non-escaped slashes? I'm not sure that wouldn't
> have some other side effect, but it might work.
wrap so many shell related things. The deeper you go the more oddball
corner cases you find.
In this particular case I think I'd probably just opt for applying the
escaping uniformly and expecting the user to do any additional
escaping, instead of risking further potential craziness. At least,
until an overall re-examination of escaping, which is planned at some
point.
At any rate, I've documented this in ticket #250:
http://code.fabfile.org/issues/show/250
Best,
Jeff
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
[Prev in Thread] | Current Thread | [Next in Thread] |