My ultimate goal is to have a terminal with Unix commands (e.g. ls instead of dir), color, and working keys in my Windows 7 machine. My current attempt at getting this to work is using Git Bash in Console2. I created a new tab with:

Title: Git Bash
Icon: C:\Program Files\Git\mingw64\share\git\git-for-windows.ico
Shell: C:\Windows\System32\cmd.exe /C "C:\Program Files\Git\bin\bash.exe" --login -i
Startup dir: C:\Users\evesforeva

Git Bash gives me the Unix commands. Adding ansicon gives me color. But when I type Ctrl+C, it closes the whole tab. I need it to stop processes like rails server without closing the tab. I also tried different combinations of swapping C:\Windows\System32\cmd.exe for C:\Windows\SysWOW64\cmd.exe and C:\Program Files\Git\bin\bash.exe for C:\Program Files\Git\bin\sh.exe and got the same results.

A direct solution to the problem would be much appreciated, but if that's not possible, I’ll take anything that provides Unix commands, color, and working keys. I also tried using Git Bash directly with minTTY, but the arrow keys don't work and irb exits after one command. I even went as far as trying to install Ubuntu. My HP Probook 650 G1 won't let me change any of the BOIS settings, so neither dual-booting nor VirtualBox worked.

How do I prevent Ctrl+C from closing the tab when running Git Bash in Console2?


Try the following

  1. "cmd.exe /c" in your command is superfluous. Remove it completely.
  2. Update to the latest git-for-windows. It has git-cmd.exe wrapper. To run it properly there are switches, something like "git-cmd.exe --cmd=/use/bin/sh.exe"
    1. Not sure about Console... Check your associated action for Ctrl+C hotkey. It may be configured improperly.
  3. Why do not give a try to ConEmu?
| improve this answer | |
  • ConEmu is perfect! Worked for me too! – sridhar249 Feb 8 '16 at 17:40

This worked for me:

Shell: C:\Windows\SysWOW64\cmd.exe /c "C:\Program Files\Git\usr\bin\bash.exe" --login -i

The bash.exe inside \Git\usr\bin seems to handle Ctrl-C normally.

*64bit Win7 using Git for Windows 2.6.1

| improve this answer | |
  • 1
    Thanks for a proper answer! Possibly something to do with the new mintty shell. – StAlphonzo Dec 12 '15 at 15:08
  • Don't forget the quotes, and don't forget to clear the CTRL-C command from the Console2 Hotkeys (clear, assign, ok) – dvtoever Jan 21 '16 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.