karan / atom-terminal

Atom package to open terminal on current file's directory with "ctrl-shift-t"
https://atom.io/packages/atom-terminal
MIT License
70 stars 30 forks source link

Not working on Windows #1

Closed Kirbo closed 10 years ago

Kirbo commented 10 years ago

I have tried in Package Settings:

APP: "C:\Program Files (x86)\Git\bin\sh.exe"
APP: C:\Program Files (x86)\Git\bin\sh.exe
APP: C:/Program Files (x86)/Git/bin/sh.exe
APP: C:/Program\ Files\ \(x86\)/Git/bin/sh.exe
APP: /C/Program\ Files\ \(x86\)/Git/bin/sh.exe
Args: --login -i
Args: 

...with no success. Nothing happens when I open a file from -lets say C:\folder\file.ext- and press ctrl+shift+t

http://msysgit.github.io

karan commented 10 years ago

Wouldn't expect it to. :p

I don't have a Windows machine but I'll try to fix it.

Kirbo commented 10 years ago

Let me know if there is anything I can do to help you :)

https://github.com/karan/atom-terminal/blob/master/lib/atom-terminal.coffee Line 18:

exec "open -a #{app} #{args} #{dirpath}" if dirpath?

Couldn't you use something like this: https://github.com/atom/atom/blob/master/script/build Line 9:

(process.platform === 'win32' ? '.cmd' : '')

Like:

if process.platform === 'osx' {
    exec "open -a #{app} #{args} #{dirpath}" if dirpath?
}
elseif process.platform === 'linux' {
    exec "#{app} #{args}"
}
elseif process.platform === 'win32' {
    exec "#{app} #{args}"
}

or:

if process.platform === 'osx' {
    exec "open -a #{app} #{args} #{dirpath}" if dirpath?
}
else {
    exec "#{app} #{args}"
}

Or make user define the absolute path of terminal and use only:

exec "#{app} #{args}"

or something like that? I have no clue about CoffeeScript nor building extensions for Atom

karan commented 10 years ago

yeah i think having condition based build might work. i'll update it soon-ish.

karan commented 10 years ago

@kirbo should be fixed now. can you confirm?

xDKomar commented 10 years ago

@karan looks like it still not working (

Installed today through File ->Settings->Packages Nothing happens on ctrl+shift+t or when I try to run it from Command Palette

tkw1536 commented 10 years ago

@xDKomar Weird, it is working for me. Is it giving an error message or something? Is something shopwing up in the inspector?

At one point, when I tried things, there was an error about windows not finding some executables (even though they existed). This fixed it: tkw1536@517a790e1399ecf3b58811abe20042dca7135c42

That fix is in another pull request and not yet merged with this repository. Can you try and use the following config:

App:"" C:\Program Files (x86)\Git\bin\sh.exe
Args:--login -i
Check setWorkingDirectory 
Check surpressDirectoryArgument
Uncheck MacWinRunDirectly

Does it work in that case? (Note the double quotation marks in the beginning of App and the space after them, please try it exactly as that!)

tkw1536 commented 10 years ago

@xDKomar The fix was just merged. Does it work now?

RangerMauve commented 10 years ago

Setting the current directory doesn't seem to be working properly

RangerMauve commented 10 years ago

Disregard my last comment, I was configuring my console wrong. It's working perfectly for me now. I'm on win8.1