Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with git-bash on windows #7

Closed
sjurba opened this issue Mar 24, 2017 · 5 comments
Closed

Doesn't work with git-bash on windows #7

sjurba opened this issue Mar 24, 2017 · 5 comments

Comments

@sjurba
Copy link
Owner

sjurba commented Mar 24, 2017

I can't get stdin.setRawMode(true) to work with Mingw which is the terminal used in Git-bash included with git on windows.

Any help, suggestions or workarounds on this issue are very welcome.

Have you found a way to use rebase-editor to work on windows with another terminal? Please let me know here.

@nztomas
Copy link

nztomas commented Mar 28, 2017

Hi there, just tried it and yes doesn-t work with git-bash :( Works find with standard windows cmd.exe which is crap) - please fix it :))))

@sjurba
Copy link
Owner Author

sjurba commented Mar 29, 2017

Don't think I can fix it really, but I came across this thread: nodejs/node#3006

From there I found a workaround that should fix the problem capturing keys.
There seems to be a program called winpty that you have to run your program through to emulate a TTY.

The workaround is to run the command like this: winpty rebase-editor.cmd
In practice this means configuring git like this:

git config --global sequence.editor 'winpty rebase-editor.cmd'

There seems to be a few more glitches that I will take a look at, but at least the app seems usable now.

Can you please try this fix and report back wether it works and if you experience any other issues?

@sjurba
Copy link
Owner Author

sjurba commented Mar 29, 2017

I also recommend using the --no-alternate-screen switch. (Might make this default for windows)

git config --global sequence.editor 'winpty rebase-editor.cmd --no-alternate-screen'

@sjurba sjurba closed this as completed Apr 21, 2017
@okainov
Copy link

okainov commented Jul 31, 2017

Just wonder, why is the issue closed? It's still not fixed, and here is just a workaround (which works, thanks for that).

@sjurba
Copy link
Owner Author

sjurba commented Jul 31, 2017

Closed it since there is no easy way for me to fix this. This is a problem with how node interacts with the terminal. It might be possible to fix in node, but more likely it must be addressed windows. Anyway, nothing I'll spend my time tackling. Also I decided to close it so people don't think it's an open issue I am or will be working on..

However if someone wants to take a stab at fixing this, that would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants