Tuesday, 15 September 2009

Open cygwin command line from context menu

This script will add extra option to context menu to open cygwin command line. Create .reg file with this script and execute it.

Windows x86

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\BashHere]
@="&Open Cygwin Window Here"

[HKEY_CLASSES_ROOT\Directory\shell\BashHere\command]
@="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""

[HKEY_CLASSES_ROOT\Drive\shell\BashHere]
@="&Open Cygwin Window Here"

[HKEY_CLASSES_ROOT\Drive\shell\BashHere\command]
@="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""
Windows x64
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\BashHere]
@="&Open Cygwin Window Here"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\BashHere\command]
@="c:\\Development\\tools\\Cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""

No comments:

Post a Comment