This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Bash Here - Start Cygwin from a folders context menu
- From: "Peter A. Castro" <doctor at fruitbat dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 29 May 2002 09:06:45 -0700 (PDT)
- Subject: Re: Bash Here - Start Cygwin from a folders context menu
On Tue, 28 May 2002, Thomas Schweikle wrote:
> Hi!
Hi back at you !-)
> Bitte antworten an "Gerrit P. Haase" <gerrit@familiehaase.de>
> Gesendet von: cygwin-owner@cygwin.com
> An: David Starks-Browning <starksb@ebi.ac.uk>
> Kopie: cygwin@cygwin.com
> Thema: Re: Bash Here - Start Cygwin from a folders context menu
>
> >> I'd like it to work before I reference it in the FAQ.
>
> Fine!
>
> > Well, it was some fiddeling.
> > It worked well but now as I tried
> > to reinstall, it doesn't work on
> > mounted drives anymore:-(
[snip]
> Neccessary changes for zsh I leave upto the reader ;-)
... and here you go (pretty simply, really):
--- start of "zsh-here.reg" ---
REGEDIT4
[HKEY_CLASSES_ROOT\Drive\shell\zshHere]
@="Shell: zsh prompt here"
[HKEY_CLASSES_ROOT\Drive\shell\zshHere\command]
@="C:\\Programme\\Cygwin\\cygwin.bat \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\zshHere]
@="Shell: zsh prompt here"
[HKEY_CLASSES_ROOT\Directory\shell\zshHere\command]
@="C:\\Programme\\Cygwin\\cygwin.bat \"%1\""
--- end of "zsh-here.reg" ---
--- start of "cygwin.bat" ---
@echo off
C:
chdir \Programme\cygwin\bin
echo cd %1 | sed -e "s#\(.\):\(.*\)#/cygdrive/\1\2#" -e "s#\\\\#/#g" > %HOMEDRIVE%\.zshcd
zsh -l -i
--- end of "cygwin.bat" ---
--- start of "/etc/zprofile" ---
PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
USER="`id -un`"
# Set up USER's home directory
if [ -z "$HOME" ]; then
HOME="/home/$USER"
fi
if [ ! -d "$HOME" ]; then
mkdir -p "$HOME"
fi
export HOME USER
for i in /etc/profile.d/*.sh ; do
if [ -f $i ]; then
. $i
fi
done
export MAKE_MODE=unix
export PS1='(%n@%m)[%h] %~ $ '
cd "$HOME"
test -f ./.zshcd && . ./.zshcd && rm -f $HOME/.zshcd
--- end of "/etc/zprofile" ---
> For W2K cmd.exe it is less complicated. You only need registry settings
> since it is not neccessary to replace '\' with '/' and substitute 'c:'
> with '/cygdrive/c' and there is an option telling cmd.exe to execute a
> commandline given command, then go to interactive mode:
--- start of "cmd-here.reg" ---
REGEDIT4
[HKEY_CLASSES_ROOT\Drive\shell\DosHere]
@="Shell: CMD &prompt here"
[HKEY_CLASSES_ROOT\Drive\shell\DosHere\Command]
@="C:\\WINNT\\System32\\cmd.exe /k cd \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\DosHere]
@="Shell: CMD &prompt here"
[HKEY_CLASSES_ROOT\Directory\shell\DosHere\Command]
@="C:\\WINNT\\System32\\cmd.exe /k cd \"%1\""
--- end of "cmd-here.reg" ---
--
Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
"Cats are just autistic Dogs" -- Dr. Tony Attwood
--
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/