Subject: Re: cygnus bugs
From: [email-masked] (Fergus Henderson)

16 Jul 1997 01:53:16 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]> <[email-masked]>
Original-To: [email-masked]
Original-Sender: [email-masked]

"$Bill Luebkert" <[email-masked]> writes:

>Fergus Henderson wrote:
>> 
>> You still didn't answer the question: how can cygwin know which
>> arguments are pathnames?  Finding a correct solution to this
>> problem is entirely non-trivial.  If you mean that cygwin should
>> treat everything that looks like it might be a pathname as a pathname,
>> then that is not a correct solution, and I think an incorrect
>> solution is going to cause more problems than it solves.
>
>Quote the ones you don't want converted.

That won't suffice, because the shell already strips away quotes
before it passes them to exec() where cygwin.dll can get its hands
on them.

So if it were to work at all, I'd have to quote things twice.

[Note: the problem we're discussing here is calling non-cygwin
utilities from cygwin programs.  In the discussion below, I'm
assuming that we're using non-cygwin versions of `echo' and `sed'.]

>> For example, consider the command `sed /usr/p /usr/p'.
>
>sed '/usr/p' /usr/p

Nope, I'd have to write e.g.

	sed "'/usr/p'" /usr/p

Even then, for that to work, cygwin.dll would have to strip away
the second level of quotes.  But that would cause more problems
than it solves.  For example, currently the command

	echo "'a string in single quotes'"

would work correctly, i.e. it would print out

	'a string in single quotes'

However, if the change you are arguing for here was made, then
it would output the string without quotes:

	a string in single quotes

So your proposed change would fix some things but break some other things.
It seems to me that net benefit (if any) is outweighed by the
increase in complexity.

--
Fergus Henderson <[email-masked]>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger [email-masked]         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".