Windows Vista introduced a nice little feature where Shift+Right Clicking the background in explorer added a “Open command window here” option. Unfortunately for us Cygwin users, this just opens cmd without running bash. Since you probably installed Cygwin for the unix shell, this is kinda annoying. But fear not. I have a hack.
Copy the following into a text file, change its extension to “.reg”, and run it. Make sure to change the path at the beginning if you have a different Cygwin directory. Now “Open command window here” will start the bash shell at the current directory.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command] @="c:\\cygwin\\bin\\bash.exe --login -i -c \"cd \\\"`cygpath -u '%V'`\\\";bash\"" [HKEY_CLASSES_ROOT\Directory\shell\cmd\command] @="c:\\cygwin\\bin\\bash.exe --login -i -c \"cd \\\"`cygpath -u '%V'`\\\";bash\""
For those of you who like regedit, here’s the same thing unescaped:
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command c:\cygwin\bin\bash.exe --login -i -c "cd \"`cygpath -u '%V'`\";bash" HKEY_CLASSES_ROOT\Directory\shell\cmd\command c:\cygwin\bin\bash.exe --login -i -c "cd \"`cygpath -u '%V'`\";bash"
Have fun!
Pingback: Open bash here (Windows Explorer) : expatiari expatria
This web site is really a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely discover it.