如何设置Sublime Text 3以使用MSYS bash构建脚本? [英] How to setup Sublime Text 3 to build script with 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.
推荐答案
要安装带有高级文本3的msys bash ,您只需将其复制到 一个新的构建系统:
To install msys bash with sublime text 3 you just have to copy this in a new build system:
{
"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构建脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!