ST3 not working with Cygwin bash
jasteele12 opened this issue · 4 comments
If I place this in the User settings file, it doesn't work (path is correct):
{
"glue_shellpath" : "C:\bin\bash.exe"
}
After restarting ST3, attempting a "set" command looks like this:
[ C:\web\ ] set
/c: /c: No such file or directory
Windows XP, bash --version
GNU bash, version 2.02.1(2)-release (i586-pc-cygwin32)
@jasteele12 you need to point to the path, not the binaries, and escape backslashes (\\
).
This should work (assuming bash.exe is in C:\bin)
{
"glue_shellpath" : "C:\\bin"
}
I am also having this issue.
█ [ C:\Users\me] ls
/c: /c: is a directory
I'm pretty sure glue_shellpath needs the path to the executable (the binaries).
Looking at the source, at time of writing, it checks if glue_shellpath is a file and gives it to subprocess.check_output/Popen as the executable
elif os.path.exists(self.shellpath) and os.path.isfile(self.shellpath):
response = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True, executable=self.shellpath)
It would be useful to have the option of passing parameters to the execuatable that glue_shellpath
points to. So we could do something like:
"glue_shellpath": "C:\\Users\\<snip>\\.babun\\cygwin\\bin\\mintty.exe --hold always --log %APPDATA%\\Glue.sublime --exe bash --rcfile ~/.babunrc --login",
It seems the minimal change would be to allow this in the following way:
"glue_shellpath": "C:\\Users\\<snip>\\.babun\\cygwin\\bin\\mintty.exe",
"glue_shellargs": "--hold always --log %APPDATA%\\Glue.sublime --exe bash --rcfile ~/.babunrc --login",
Thanks for the suggestion. This hasn't been under active development for a few years but would be happy to consider a PR if you guys want to test it to see if it addresses this issue. Or feel free to fork and push improvements up to the Sublime packages!