Bash HereMicrosoft has a Windows Powertoy that is basically a Windows shell extension enabling launching a command prompt for a selected folder. It’s really useful for command line users. I came across a way to add similar command for Bash shell. I think I saw this hack on one of the blogs last year. I only tried it on WinXP, so your milage will vary if you’re using older versions of windows.

The following assumes your Bash executable is installed on c:\cygwin\bin\bash.exe, replace that with the correct path on your system. Save the following to a file with .reg extension and simply double click it to install the registries. Once installed, you should see the “Open Bash Shell Here” command when you right click on a folder in Windows Explorer. Fairly straight forward.


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Open Bash Shell Here"

[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="c:\cygwin\bin\bash.exe --login -i -c 'cd "`cygpath "$*"`";bash' bash %L"

[HKEY_CLASSES_ROOT\Drive\shell\bash]
@="Open Bash Shell Here"

[HKEY_CLASSES_ROOT\Drive\shell\bash\command]
@="c:\cygwin\bin\bash.exe --login -i -c 'cd "`cygpath "$*"`";bash' bash %L"