This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Open bash at the current explorer directory?

Sure. We are both talking about following key, right?

Windows Registry Editor Version 5.00

@="Open rxvt Window Here"

@="C:\\cygwin\\bin\\rxvt.exe -bg black -fg white -sr -sl 1000 -fn
\"Fixedsys\" -ls -e /usr/bin/bash --login -c \"cd \\\"`cygpath -u '%1'`\\\";
exec bash\""

It didn't work for me. My settings in .bash_profile were not executed in the
final 'exec bash' but in the -e /usr/bin/bash, which is wrong, because it
gets forgotten by the exec'ed shell. If you add -l (exec -l bash) it is
executed twice. In my case it tells me two fortune cookies instead of one.
That's nice, but they may run out quickly :)


----- Original Message -----
From: "Marcos Lorenzo de Santiago" <>
To: "Frantisek Dufka" <>
Cc: <>
Sent: Wednesday, September 18, 2002 11:05 AM
Subject: Re: Open bash at the current explorer directory?

     > I don't know how to do it without using .bashrc, but this works for
     > (current cygwin, NT 4.0)
     > Registry key contains:
     > D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn fixedsys -fg gray -bg
     > -e /bin/env CFH="%1" /bin/bash --login
     > .bashrc contains
     > if [ "$CFH" != "" ] ; then
     >      cd "$CFH"
     >      unset CFH
     > fi
     > No temporary files, bash.exe or .bash_profile is not executed twice.
     > Also looks like cygpath -u is not needed, DOS paths seem to work in
     > command.

Not long ago someone posted a registry key to do this with right-click
button option. It works quite well and you can modify the key to your own
preferences (background colour, font colour, etc.). Someone posted a way
to opne a explorer from current bash PWD.


     > Frantisek
     > -------------------------------------
     > * John Daniel Doucette <> [13-09-02 15:23]:
     >  > I am using Win2000 Pro, SP3.   Is there a way to invoke an
     > interactive bash
     >  > shell at a particular directory, without using a .bashrc or
     > file?
     >  > I.e. on the command lie alone?  The --login and -c options appear
to be
     >  > mutually exclusive.  I would like to be able browse quickly to a
     > directory
     >  > with explorer, option/right click on the directory, then select a
     >  > "open with cygwin" option, and have the bash shell open at that
     >  > directory.  Has anyone tried this?
     > Read this from the archive.
     > HTH
     > Jens


Equipo Técnico de Laboratorios:
Gregorio Corral Torres
Esteban García Cuesta
Marcos Lorenzo de Santiago
Iván Alonso Gutiérrez

Departamento de Ingeniería Telemática
Edificio Torres Quevedo 4.1A01 Tfno:91-624-8757
Escuela Politécnica Superior
Universidad Carlos III Av.Universidad 30 Leganés (Madrid).

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]