从Eclipse使用Cygwin bash代替Windows的Git Bash运行shell脚本 [英] Run a shell script using Cygwin bash instead of Git Bash for Windows from Eclipse

查看:79
本文介绍了从Eclipse使用Cygwin bash代替Windows的Git Bash运行shell脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中(在Windows上)单击 .sh 脚本,将使用Windows的Git Bash执行该脚本.但是,我想改用Cygwin bash.

有一个看起来像这样的选项:

我删除了显示的Git Bash条目,并添加了一个指向Cygwin bash可执行文件的路径的条目.但是,这并没有任何改变-Windows仍使用Git Bash-在关闭并打开Eclipse之后,Git Bash条目再次出现.

如何配置Eclipse以使用Cygwin bash?

解决方案

您还可以使用

有关如何启动脚本的说明,请参见 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 at https://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脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆