本文介绍了如何设置Sublime Text 3以使用MSYS bash构建脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何设置sublime text 3构建系统以执行bash脚本,然后将其放到MSYS bash中.
Hi i would like to know how to setup sublime text 3 build system to execute bash script threw MSYS bash.
我尝试了以下构建系统:
I have try the following build system :
{
"cmd" : ["bash", "$file"],
"selector" : "source.shell",
"path" : "C:/MinGW/msys/1.0/bin"
}
它看起来确实可以工作,但是找不到gcc,我已经尝试通过这种方式添加多个路径:
It does look to work, but it can't find gcc, i have try to add multiple path this way :
"path" : "C:/MinGW/msys/1.0/bin:C:/MinGW/bin"
但是 C:看起来很糟糕.我也尝试过这个:
But the C: looks to break the thing.I have also try this :
"path" : ["C:/MinGW/msys/1.0/bin", "C:/MinGW/bin"]
但是它也失败了,因为路径仅在等待字符串
But it fail also as path is waiting for a string only
"path" :"C\:/MinGW/msys/1.0/bin:C\:/MinGW/bin"
"path" :"C:/MinGW/msys/1.0/bin\:C:/MinGW/bin"
"path" :"${C:/MinGW/msys/1.0/bin}:${C:/MinGW/bin}"
也失败了...
"path" : "/c/MinGW/msys/1.0/bin:/c/MinGW/bin"
"path" : "/MinGW/msys/1.0/bin:/MinGW/bin"
与那些人相同...
任何工作建议将不胜感激.
Any working suggestion would be greatly appreciated.
推荐答案
{
"cmd" : ["bash", "$file"],
"selector" : "source.shell",
"windows": {
"path" : "$path;c:\\mingw\\bin;c:\\mingw\\msys\\1.0\\bin",
"cmd" : ["bash", "--login", "-i", "-c", "cd \"$file_path\"; \"$file\""]
},
"osx": {
"path" : "$PATH:/usr/local/bin:/usr/X11R6/bin:/opt/X11/bin:/usr/texbin"
}
}
感谢macite:
https://github.com/macite/sublimebashbuildsystem/blob /master/Bash.sublime-build
这篇关于如何设置Sublime Text 3以使用MSYS bash构建脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!