@edit on Windows

Yes that’s a good point.
I checked this in Control Panel -> Default Programs, and I can also open .jl files by clicking in Windows Explorer, so I think this is OK.

After some further investigation, I think I have narrowed down the issue for me:

As an example @edit cmp(1,2) attempts to run the command:

cmd /c start /b 'C:\Program Files\Julia-0.5.0\bin\../share\julia\base\operators.jl'

I think there are two issues here:

  1. The space in file path: start tries run C:\Program. I tried many variations of extra quoting with single and double quotes but couldn’t get it to work.
  2. The forward slash in path (../share)

So my workaround is:

cmd = `cmd /c start /b /D $(realpath(dirname(path))) $(basename(path))`

which runs the command:

cmd /c start /b /D 'C:\Program Files\Julia-0.5.0\share\julia\base' operators.jl

For some reason space is OK in directory /D, realpath removes the forward slash.

However the default open still has the limitation of not supporting line number.