public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Will win32 style paths ever work in mksh on cygwin?
@ 2011-12-01  9:23 Oliver
  2011-12-01 15:31 ` Larry Hall (Cygwin)
  2011-12-01 16:35 ` Andrey Repin
  0 siblings, 2 replies; 5+ messages in thread
From: Oliver @ 2011-12-01  9:23 UTC (permalink / raw)
  To: cygwin

Folks,

this is a question for which I have not found a solution in the web...
It seems that win32 style paths do not work in mksh.
The command
   cd c:/
fails in mksh because the path is not POSIX style.
The only reference I found to this on the mksh project web site
states that mksh uses POSIX paths only and will never support win32 
style paths.

On the other hand, the cygwin documentation seems to claim that cygwin 
will support both, win32 style paths and POSIX style paths.

Are there any plans to make mksh on cygwin win32-path aware, or will 
mksh on cygwin support only POSIX?
If it remains to be POSIX only, and pdksh apparently gone from the list
of shells, is the only alternative to rewrite all existing ksh scripts
that might use win32 style paths?

Thanks

Oliver



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Will win32 style paths ever work in mksh on cygwin?
  2011-12-01  9:23 Will win32 style paths ever work in mksh on cygwin? Oliver
@ 2011-12-01 15:31 ` Larry Hall (Cygwin)
  2011-12-01 16:35 ` Andrey Repin
  1 sibling, 0 replies; 5+ messages in thread
From: Larry Hall (Cygwin) @ 2011-12-01 15:31 UTC (permalink / raw)
  To: cygwin

On 12/1/2011 4:22 AM, Oliver wrote:
> Folks,
>
> this is a question for which I have not found a solution in the web...
> It seems that win32 style paths do not work in mksh.
> The command
> cd c:/
> fails in mksh because the path is not POSIX style.
> The only reference I found to this on the mksh project web site
> states that mksh uses POSIX paths only and will never support win32 style
> paths.
>
> On the other hand, the cygwin documentation seems to claim that cygwin will
> support both, win32 style paths and POSIX style paths.
>
> Are there any plans to make mksh on cygwin win32-path aware, or will mksh on
> cygwin support only POSIX?
> If it remains to be POSIX only, and pdksh apparently gone from the list
> of shells, is the only alternative to rewrite all existing ksh scripts
> that might use win32 style paths?

I'm not the Cygwin mksh maintainer but I'd recommend your statement above as
a general axiom in this case.  Obviously, if the Cygwin mksh maintainer
decides that it makes sense to do the extra work and maintain a Cygwin-
specific patch to support Windows-style paths, then things would change in
the future.  But you're betting on the generosity of the maintainer here
so your safe bet is to take what the upstream maintainers recommend.  Also,
while Cygwin doesn't go out of its way to make Windows-style paths unusable,
the support for them is secondary to the main goal of providing a POSIXy
or Linux-like environment.  As far as paths are concerned, that means
sometimes there are conflicts that only POSIX paths can resolve.  So while
it's fair to say that Windows-style paths are generally usable in Cygwin,
POSIX paths are always recommended and are sometimes the only alternative.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Will win32 style paths ever work in mksh on cygwin?
  2011-12-01  9:23 Will win32 style paths ever work in mksh on cygwin? Oliver
  2011-12-01 15:31 ` Larry Hall (Cygwin)
@ 2011-12-01 16:35 ` Andrey Repin
  2011-12-01 19:17   ` Chris Sutcliffe
  1 sibling, 1 reply; 5+ messages in thread
From: Andrey Repin @ 2011-12-01 16:35 UTC (permalink / raw)
  To: Oliver, cygwin

Greetings, Oliver!

> On the other hand, the cygwin documentation seems to claim that cygwin
> will support both, win32 style paths and POSIX style paths.

Cygwin, as in, the utilities, when fed with native path - mostly works.
Specific program on the inside of it - it's up to that program.

> Are there any plans to make mksh on cygwin win32-path aware, or will 
> mksh on cygwin support only POSIX?

You have to ask mksh author(s).

> If it remains to be POSIX only, and pdksh apparently gone from the list
> of shells, is the only alternative to rewrite all existing ksh scripts
> that might use win32 style paths?

The last trend in *NIX society, that I noticed, is to write portable scripts.
Which means, they should work with /bin/sh. (The base POSIX shell implementation.)


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 01.12.2011, <20:26>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Will win32 style paths ever work in mksh on cygwin?
  2011-12-01 16:35 ` Andrey Repin
@ 2011-12-01 19:17   ` Chris Sutcliffe
  2011-12-04  3:33     ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Sutcliffe @ 2011-12-01 19:17 UTC (permalink / raw)
  To: cygwin

Hi All,

I am the mksh maintainer for Cygwin...

On 1 December 2011 11:30, Andrey Repin wrote:
>> Are there any plans to make mksh on cygwin win32-path aware, or will
>> mksh on cygwin support only POSIX?
>
> You have to ask mksh author(s).

I work closely with Thorsten Glaser, who is the mksh author.  His
position is that mksh behaviour should remain consistent across
platforms, as such his expectation is that any scripts run via mksh be
POSIX path compliant (this has come up in the past).

>> If it remains to be POSIX only, and pdksh apparently gone from the list
>> of shells, is the only alternative to rewrite all existing ksh scripts
>> that might use win32 style paths?
>
> The last trend in *NIX society, that I noticed, is to write portable scripts.
> Which means, they should work with /bin/sh. (The base POSIX shell implementation.)

Fundamentally, Cygwin has been pushing the use of POSIX paths for
quite some time (in fact it warns you when it encounters a DOS /
Windows path).  As has been pointed out, many Cygwin utilities support
DOS / Windows paths (likely for historical reasons I suspect), but
mksh will not.

Not the answer you were hoping for I'm sure, but it is where we are at
right now.

Cheers,

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Will win32 style paths ever work in mksh on cygwin?
  2011-12-01 19:17   ` Chris Sutcliffe
@ 2011-12-04  3:33     ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 0 replies; 5+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2011-12-04  3:33 UTC (permalink / raw)
  To: cygwin

Chris Sutcliffe sent the following at Thursday, December 01, 2011 2:17 PM
>Fundamentally, Cygwin has been pushing the use of POSIX paths for quite
>some time (in fact it warns you when it encounters a DOS / Windows
>path).  As has been pointed out, many Cygwin utilities support DOS /
>Windows paths (likely for historical reasons I suspect), but mksh will
>not.

To expand on the above, as I understand it, the reason cygwin understands
Windows PATHs is so one can use Cygwin utilities in a cmd.exe prompt or
in batch files.  See also
<http://cygwin.com/cygwin-ug-net/using.html#pathnames-win32>.
Please consider whether cygpath might be of use:
<man cygpath>
<http://cygwin.com/faq/faq-nochunks.html#faq.using.converting-paths>
<http://cygwin.com/cygwin-ug-net/using-utils.html#cygpath>

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-04  3:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-01  9:23 Will win32 style paths ever work in mksh on cygwin? Oliver
2011-12-01 15:31 ` Larry Hall (Cygwin)
2011-12-01 16:35 ` Andrey Repin
2011-12-01 19:17   ` Chris Sutcliffe
2011-12-04  3:33     ` Buchbinder, Barry (NIH/NIAID) [E]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).