如何设置 Sublime Text 3 以使用 MSYS bash 构建脚本?

How to setup Sublime Text 3 to build script with MSYS bash?

你好,我想知道如何设置 sublime text 3 构建系统来执行 bash 脚本抛出 MSYS bash.

我尝试了以下构建系统:

{
    "cmd"       : ["bash", "$file"],
    "selector"  : "source.shell",
    "path"      : "C:/MinGW/msys/1.0/bin"
}

它看起来确实有效,但找不到 gcc,我已尝试通过这种方式添加多个路径:

    "path"      : "C:/MinGW/msys/1.0/bin:C:/MinGW/bin"

但是 C: 看起来破坏了东西。 我也试过这个:

    "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"      : "/c/MinGW/msys/1.0/bin:/c/MinGW/bin"
     "path"      : "/MinGW/msys/1.0/bin:/MinGW/bin"

同样适用于那些...

任何工作建议将不胜感激。

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