Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 29 May 2002 09:06:45 -0700 (PDT) From: "Peter A. Castro" To: cygwin AT cygwin DOT com Subject: Re: Bash Here - Start Cygwin from a folders context menu In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 28 May 2002, Thomas Schweikle wrote: > Hi! Hi back at you !-) > Bitte antworten an "Gerrit P. Haase" > Gesendet von: cygwin-owner AT cygwin DOT com > An: David Starks-Browning > Kopie: cygwin AT cygwin DOT 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 or "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/