X-Spam-Check-By: sourceware.org From: ericblake AT comcast DOT net (Eric Blake) To: Subject: RE: default PATH Date: Sat, 11 Feb 2006 20:22:36 +0000 Message-Id: <021120062022.25491.43EE478C000D242F0000639322007456720A050E040D0C079D0A@comcast.net> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > > " There are two different points of view possible here: > " > " - Changing an empty Win32 path component to a POSIX "." entry is in > " Cygwin for a long time. It's possible that people rely on this > " behaviour, so changing it would break existing installations. > " Removing "." from $PATH could easily be accomplished in a script. > " > " - Changing an empty Win32 path component to a POSIX "." entry is an > " inherently dangerous behaviour and should not be done automatically. > " Adding "." to $PATH could easily be accomplished in a script. > > > " So, what's the way to go? Any third possibility perhaps? > > I'd also be inclined to consider explicitly prepending a dot in the > translation. This means we're no longer just converting %PATH% to $PATH, > but rather, the CreateProcess behaviour involving %PATH% -- prepending a dot > is turning CreateProcess's implicit behaviour into something explicit. > > > The existing situation (point of view 1) is not horrible either, and has > the backwards compatibility thing going for it. But I think I'd prefer > either 2 or 3. 3 has that bit of propagated evil from CreateProcess, but > is prehaps slightly more backwards compatible (breaking fewer installations) > than 2. I strongly oppose option 3 - cygwin should never add '.' implicitly to the front of a POSIX path - if you are crazy enough to want dot there, put it there yourself explicitly. But I like option 2, of squeezing ';;' into a single ':' (avoiding the implicit dot of $PATH '::'), and ignoring trailing ';' (again, avoiding the implicit dot of $PATH trailing ':'). If the user wants dot in the middle or at the end, automagically converted from the Windows %PATH%, then they can explicitly use ';.;' or trailing ';.' to make their intent clear. And since Windows always implicitly prepends '.' to %PATH%, this might cut down on the traffic to this list of "how did . get on my $PATH?". (Although it will probably increase the traffic of "why did ;; get turned into : instead of ::?") -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/