Accepted answer

You can't.

Some cygwin conversion is done in the launcher script, for classpaths, but it doesn't do file arguments.

Consider scala file.scala and scala pkg.Main as ambiguous.

Edit: maybe it's worth a feature request, since, besides -i handling, you can try to detect file paths to convert (slashes and colons).

(This is the same condition from plain Java, of course.)


This is, sadly, expected behavior, as detailed on the Using Cygwin effectively page:

Windows programs do not understand POSIX pathnames, so any arguments that reference the filesystem must be in Windows (or DOS) format or translated.

The cygpath utility can be used to work-around this issue in some cases, but this won't work inside the Scala REPL, and requires handling a Cygwin environment explicitly in otherwise cross-platform scripts.

Related Query

More Query from same tag