Mail Archives: cygwin/1997/07/16/01:53:16
"$Bill Luebkert" <dbe AT wgn DOT 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 AT cs DOT mu DOT oz DOT 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 AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -