delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/29/21:14:58

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: <40429C98.7050301@sbcglobal.net>
Date: Sun, 29 Feb 2004 20:14:48 -0600
From: Gregory Borota <cygwin AT sbcglobal DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Cygwin Shell Here
X-IsSubscribed: yes

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

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019