问题描述
在Eclipse中(在Windows上)单击 .sh
脚本,将使用Windows的Git Bash执行该脚本.但是,我想改用Cygwin bash.
有一个看起来像这样的选项:
我删除了显示的Git Bash条目,并添加了一个指向Cygwin bash可执行文件的路径的条目.但是,这并没有任何改变-Windows仍使用Git Bash-在关闭并打开Eclipse之后,Git Bash条目再次出现.
如何配置Eclipse以使用Cygwin bash?
您还可以使用
有关如何启动脚本的说明,请参见 https://github.com/de-jcup/eclipse-bash-editor/wiki/FAQ#how-can-i-execute-shell-scripts-with-bash-editor
该插件还包含一个集成的bash调试器,该调试器也应与cygwin bash一起使用.对于Windows 10机器上正在运行的调试器,您可以查看 YouTube视频-Windows 10上的Bash编辑器调试.在这里,您可以看到执行git bash的默认配置.当然,您必须稍微自定义启动命令,但是我认为这是可行的.
PS:我是提到的插件的维护者
Clicking on a .sh
script inside Eclipse (on Windows) executes it using Git Bash for Windows. However, I'd like to use Cygwin bash instead.
There is an option which looks like this:
I removed the shown entry for Git Bash and added an entry with a path to the Cygwin bash executable. However, this doesn't change anything - Git Bash for Windows is still used - and after closing and opening Eclipse the Git Bash entry is there again.
How can I configure Eclipse to use Cygwin bash?
You could also use https://marketplace.eclipse.org/content/bash-editor
Here you can customize the command
A description how to launch the scripts can be found athttps://github.com/de-jcup/eclipse-bash-editor/wiki/FAQ#how-can-i-execute-shell-scripts-with-bash-editor
The plugin contains also an integrated bash debugger which should work with cygwin bash as well. For the debugger in action on a Windows 10 machine you can look at YouTube Video - Bash editor debugging on Windows 10. Here you can see the default configuration done to execut git bash. Of course you have to customize start command a bit, but I think it's feasable.
PS: I am the maintaner of the mentioned plugin
这篇关于从Eclipse使用Cygwin bash代替Windows的Git Bash运行shell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!