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

2019-08-06 02:19发布

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条回答
【Aperson】
2楼-- · 2019-08-06 02:31

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.

查看更多
登录 后发表回答