In the Ubuntu Bash shell in Windows 10, how do you

2019-08-06 02:26发布

问题:

E.g., if I have .java files set to open with Notepad++, is there some command I can run like open ./Blah.java that will open Blah.java in Notepad++, or open . to open the current directory in Explorer? On Mac OS X, open is this command.

回答1:

You need something that wraps the ShellExecute function.

With Cygwin, this is cygstart.

With PowerShell, this is Start-Process.

You can run PowerShell from the Bash shell, but it is not ideal:

powershell Start-Process Blah.java

This is currently a feature request for Ubuntu on Windows.