This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: default PATH


> 
> " 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]