glue icon indicating copy to clipboard operation
glue copied to clipboard

ST3 not working with Cygwin bash

Open jasteele12 opened this issue 9 years ago • 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 avatar Oct 19 '15 17:10 jasteele12

@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"
}

m-sostero avatar Feb 28 '16 12:02 m-sostero

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)

Chovin avatar Mar 26 '17 23:03 Chovin

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",

taqtiqa-mark avatar Sep 13 '17 23:09 taqtiqa-mark

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!

chrissimpkins avatar Sep 14 '17 00:09 chrissimpkins