cygnus bugs

Fergus Henderson fjh@cs.mu.OZ.AU
Wed Jul 16 00:40:00 GMT 1997


"$Bill Luebkert" <dbe@wgn.net> 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 <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list