In Windows Explorer I want to add a "CYGWIN Shell" context menu option on file system folders, giving me a quick way to open a Cygwin window pointing at the selected folder. This is what I came up with:

1. In the cygwin.bat file I add the line

set __CYG_PATH_=%~1

(somewhere before 'bash --login -i' line)


2. In my .bash_profile I add the line:


cd "$__CYG_PATH_"


3. I add to the registry the following lines:


[HKEY_CLASSES_ROOT\Directory\shell\CygCmd]
@="CYGWIN Shell"

[HKEY_CLASSES_ROOT\Directory\shell\CygCmd\command]
@="C:\\cygwin\\cygwin.bat \"%1\""

[HKEY_CLASSES_ROOT\Drive\shell\CygCmd]
@="CYGWIN Shell"

[HKEY_CLASSES_ROOT\Drive\shell\CygCmd\command]
@="C:\\cygwin\\cygwin.bat \"%1\""


I wonder if there isn't a simpler and nicer way to do this?


Gregory
ÿþWindows Registry Editor Version 5.00



[HKEY_CLASSES_ROOT\Directory\shell\CygCmd]

[EMAIL PROTECTED]"CYGWIN Shell"



[HKEY_CLASSES_ROOT\Directory\shell\CygCmd\command]

[EMAIL PROTECTED]"C:\\cygwin\\cygwin.bat \"%1\""



[HKEY_CLASSES_ROOT\Drive\shell\CygCmd]

[EMAIL PROTECTED]"CYGWIN Shell"



[HKEY_CLASSES_ROOT\Drive\shell\CygCmd\command]

[EMAIL PROTECTED]"C:\\cygwin\\cygwin.bat \"%1\""

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to