This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [INFO] Adding "Cygwin here" to Windows Explorer
Henry S. Thompson schrieb:
1) In the registry entry:
C:\cygwin\bin\rxvt.exe -fn 'Lucida Console-11' -geometry 80x48 -sl 300 -cr '#8b4513' -bg '#fffff0' -e /usr/bin/bash -c "XXX=\"%1\" bash --login -i"
2) In my .bash_profile
if [[ "x$XXX" != "x" ]]
then
cd "$XXX"
unset XXX
fi
This is a moderately embarassing/messy hack -- can anyone do better?
I use a similar scheme since the good old b20 days.
Just not with the XXX name and not with a subshell.
(I put the $PWD arg into a temp file in the cygwin.bat starter, which I
pickup at .profile)
And not for the Explorer (which I don't use), but for a TotalCmd button.
To open some shell like bash, rxvt, ksh, 4nt in the current dir
(optinally specified by some dir arg).
A keyboard shortcut is also useful.
And I also apply a lot of path unification then, to shorten
the windows path (where I use subst) to the optimal cygwin path
(where I have symlinks)
.profile:
case $PWD in
/cygdrive/r/PERL* )
cd `echo $PWD | sed -e 's!/cygdrive/r/PERL!/usr/src/perl!'`
;;
/cygdrive/r/gnu/cygwin* )
cd `echo $PWD | sed -e 's!/cygdrive/r/gnu/cygwin!/usr/src!'`
;;
/cygdrive/r/gnu* )
cd `echo $PWD | sed -e 's!/cygdrive/r/gnu!/usr/src/gnu!'`
;;
/cygdrive/r/lisp* )
cd `echo $PWD | sed -e 's!/cygdrive/r/lisp!/usr/src/lisp!'`
;;
/cygdrive/p/CORMAN* )
cd `echo $PWD | sed -e
's!/cygdrive/p/CORMAN~1/CORMAN~1.5!/usr/src/lisp/corman!'`
;;
/cygdrive/r/php* )
cd `echo $PWD | sed -e 's!/cygdrive/r/php!/usr/src/php!'`
;;
/cygdrive/n/* )
cd `echo $PWD | sed -e 's!/cygdrive/n/!/!'`
;;
/cygdrive/v/* )
cd `echo $PWD | sed -e 's!/cygdrive/v!/www!'`
;;
/f/data/mp3/* )
cd `echo $PWD | sed -e 's!/f/data/mp3/!/music/!'`
;;
esac
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
--
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/