Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com> List-Archive: <http://sources.redhat.com/ml/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.1.0.14.0.20020918165306.00a834b8@jjmackay.ca> X-Sender: john DOT doucette AT jjmackay DOT ca Date: Wed, 18 Sep 2002 17:04:44 -0300 To: cygwin AT cygwin DOT com From: John Daniel Doucette <john DOT doucette AT jjmackay DOT ca> Subject: Open bash at the current explorer directory? Cc: pechtcha AT cs DOT nyu DOT edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Igor, With all the great info on the mailing list and some research on my own, this is the registry file I came up with to open a cygwin rxvt shell at the current explorer directory/drive. It also includes the option to open a Command prompt at the explorer directory/drive (Horrors!). It works under Win2000 SP3. For XP, just replace the WINNT path segments (2!) with WINDOWS. The first invocation of bash loads all the profile information but is not interactive so that it can CD to the right directory, then exec replaces the current shell without reading any profile information. I diff'ed a PRINTENV output before and after the exec command and they proved to be the same. My bashrc only gets executed once in this case. Hope this provides more info. I am still trying to figure out how to get those cute little icons in the context menu though! All the keys have "Custom_" in their names to make them easy to find and remove if you don't like their function. ====================File: OpenWith.reg, CUT HERE =========================== Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCommandPrompt] @="Open with Command Prompt" [HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCommandPrompt\command] @="c:\\WINNT\\system32\\cmd.exe %1" [HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCygwinShell] @="Open with Cygwin Shell (rxvt)" [HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCygwinShell\command] @="C:\\cygwin\\bin\\rxvt.exe -geometry 96x76+800+5 -fg gray -bg black -fn Fixedsys-8 -sl 2500 -sr -tn cygwin -e c:/cygwin/bin/bash --login -c \"cd '%1'; exec bash --noprofile --norc -i\"" [HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCommandPrompt] @="Open with Command Prompt" [HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCommandPrompt\command] @="c:\\WINNT\\system32\\cmd.exe /F:ON %1" [HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCygwinShell] @="Open with Cygwin Shell (rxvt)" [HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCygwinShell\command] @="C:\\cygwin\\bin\\rxvt.exe -geometry 96x76+800+5 -fg gray -bg black -fn Fixedsys-8 -sl 2500 -sr -tn cygwin -e c:/cygwin/bin/bash --login -c \"cd '%1'; exec bash --noprofile --norc -i\"" ==================== CUT HERE =========================== =================================== John Daniel Doucette, Sr. Software Designer J. J. MacKay Canada Limited Halifax R & D Office 1046 Barrington Street, 1st Floor Halifax, Nova Scotia Canada B3H 2R1 Phone: 902.423.7727 x222 Fax: 902.422.8108 Web: www . jjmackay . ca Email: john . doucette @ jjmackay . ca =================================== -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/