|
From: Keith M. <kei...@us...> - 2006-06-16 16:18:49
|
On Thursday 15 June 2006 10:42 pm, Earnie Boyd wrote: [In respect of the automatic path translation performed in MSYS] > What do the users think, should I allow any number of characters > between - and /? The whole issue is, unfortunately, a heuristic nightmare. To borrow a quote from Bruno Haible, "any algorithm, which relies on heuristics, is broken by design". It's unfortunate that any such translation is required at all, but of course MSYS wouldn't be very effective without it. The problem is, where do you stop with the heuristics? There are already situations where the existing algorithm goes too far; Greg's sed example is a typical case in point; there is also a problem with the emacs build procedure, which has been discussed in the past, where unwanted translation occurs. I've previously suggested that any string enclosed in quotes should be exempt from translation, but do the quotes remain in place to be seen by the translation routine? Earnie has suggested that bash has already removed them, by the time they get to this routine, and I've no reason to doubt that this is so. However aggressively this heuristic algorithm tries to identify arguments which should be translated, there are always going to be edge cases where it gets it wrong. What we have at the moment isn't perfect; since it's heuristic, it never can be, but it's a reasonable compromise for a majority of situations. I vote we leave it alone, unless an algorithm can be suggested, which gives the user a *portable*, and deterministic, way to express arguments, such that the translation routine *knows* when it is required to leave them alone. Regards, Keith. |