delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/10/20:30:44

X-Spam-Check-By: sourceware.org
Message-ID: <813e5f920611101730i7bd3aa00s34db8af7fefddf90@mail.gmail.com>
Date: Sat, 11 Nov 2006 12:30:17 +1100
From: "Hugh McMaster" <dasjournal AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: "Bash Here..." menu option "howto" reg-entry
In-Reply-To: <45550DA4.6090208@tlinx.org>
MIME-Version: 1.0
References: <45550DA4 DOT 6090208 AT tlinx DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

Hi Linda,

Just a quick note.  In the setup programme, there is an option to have
'Open Bash Prompt Here' context menu added to the right-click menu.

Hugh


On 11/11/06, Linda Walsh wrote:
> After some time debugging I figured out a way to add a prompt option
>
> to the right-click menu on directories and drives that works for
> my alternate drives and network directories.  I think it should be
> able to be generalized for other shells, but I use "Bash".
>
> The reg-entry for directories is:
> REGEDIT4
>
> [HKEY_CLASSES_ROOT\Directory\shell\Bash Here...]
>
> [HKEY_CLASSES_ROOT\Directory\shell\Bash Here...\Command]
> @="C:\\bin\\ash.exe -c 'PATH=\"/bin:$PATH\"; test -z \"$SHELL\" &&
> SHELL=C:\\\\bin\\\\bash.exe;  cd \"%L\"; cygstart -d \"$PWD\" \"$SHELL\"'"
>
> ---(note, last line starting with "@" is all 1 line)
> Assumptions:
> 1) Cygwin Drive Prefix=/    #(mount -c '/')
> 2) Cygwin's directories are same under Cygwin and NT
>    (cygwin not installed in a subdir)
>
> It also uses "ash.exe", "test.exe" and "cygstart.exe", which
> I believe are part of the base distribution.
>
> Viewing a CD/DVD in drive E:, root dir, - right-click(menu),
>    Pick "Bash Here...", brings up a bash-command window with
>    current dir = "/e/<dirname>
>
> UNC pathnames show up as one would expect:
>    //"sharename"/"dirname"
>
> Advantages over other known methods:
>
> 1) no external programs required;
> 2) no "stacked" shell processes left in process table
>
> Maybe the registry entries could go in a Cygwin FAQ entry?
>

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