X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <47F534CA.5FC6AEDC@dessent.net>
Date: Thu, 03 Apr 2008 12:49:30 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: drag and drop folder from Explorer to cygwin
References: <52388.7403.qm@web51910.mail.re2.yahoo.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Richard Trevor wrote:

> I'd like to drag a folder from Windows Explorer (XP) and drop it on the cygwin desktop shortcut,
> causing a cygwin (bash) shell to open in the folder directory.

I don't think there's any magic to it, when you drop something onto a
shortcut it just sets the arguments to the filenames of the items.  So
you'd need to modify the batch file to check if %1 is set and use the
chere mechanism, i.e. cd to %1 and then set CHERE_INVOKING to prevent
the /etc/profile from changing to $HOME.

Brian

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

