public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Open bash at the current explorer directory?
@ 2002-09-26  0:48 Gunnar Boström
  2002-09-26  7:31 ` Open bash@the " Igor Pechtchanski
  0 siblings, 1 reply; 28+ messages in thread
From: Gunnar Boström @ 2002-09-26  0:48 UTC (permalink / raw)
  To: cygwin

I only have ntsec in $CYGWIN.
I tried your advise below but "cygpath -w -l" returns garbage!
The very first problem is that env CFH="%1" in the register inserts the short windows form.
Is it possible to force windows to insert the long form?
:-)


> -----Original Message-----
> From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu] 
> Sent: den 25 september 2002 23:02
> To: Gunnar Boström
> Cc: cygwin@cygwin.com
> Subject: RE: Open bash at the current explorer directory?
> 
> 
> Gunnar,
> I assume your $CYGWIN contains "check_case:strict", since that is the
> setting in which the short paths won't work.  They will work 
> if $CYGWIN
> contains "check_case:adjust".  So, you can use the following 
> sequence in
> your .bashrc to get the correct form of the windows path:
> 
> if [ -n "$CFH" ] ; then
>    CFH="$(export CYGWIN="$CYGWIN check_case:adjust";cygpath 
> -w -l "$CFH")"
>    cd "$CFH"
>    unset CFH
> fi
> 
> Hope this helps,
> 	Igor
> 
> On Wed, 25 Sep 2002, [iso-8859-1] Gunnar Boström wrote:
> 
> > This works fine except that I get the windows short form of the
> > directories in the CFH variable.
> > I've tried filtering through cygpath but no luck.
> > Any suggestion?
> >
> > :-?
> >
> > > -----Original Message-----
> > > From: Frantisek Dufka [mailto:dufkaf@seznam.cz]
> > > Sent: den 18 september 2002 10:56
> > > To: cygwin@cygwin.com
> > > Subject: Re: Open bash at the current explorer directory?
> > >
> > >
> > > I don't know how to do it without using .bashrc, but this
> > > works for me
> > > (current cygwin, NT 4.0)
> > >
> > > Registry key contains:
> > >
> > > D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn fixedsys -fg
> > > gray -bg black
> > > -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 cd
> > > command.
> > >
> > > Frantisek
> > >
> > > -------------------------------------
> > > * John Daniel Doucette <john.doucette@jjmackay.ca> 
> [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 similar
> > > 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 custom
> > >  > "open with cygwin" option, and have the bash shell open at that
> > >  > directory.  Has anyone tried this?
> > >
> > > Read this from the archive.
> > > http://www.cygwin.com/ml/cygwin/2002-05/msg01648.html
> > >
> > > HTH
> > > Jens
> > >
> > >
> >
> > --
> > 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/
> >
> 
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha@cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> "Water molecules expand as they grow warmer" (C) Popular 
> Science, Oct'02, p.51
> 
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Open bash at the current explorer directory?
@ 2002-09-30  9:57 Gunnar Boström
  2002-09-30 10:00 ` Christopher Faylor
  0 siblings, 1 reply; 28+ messages in thread
From: Gunnar Boström @ 2002-09-30  9:57 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Actually this was what I started with, but I had some trouble with the installation.
Later on I found the idea to use an environment varable instead of writing to a temp-file.
:-)


> -----Original Message-----
> From: Gerrit P. Haase [mailto:freeweb@nyckelpiga.de] 
> Sent: den 30 september 2002 14:50
> To: Gunnar Boström
> Cc: cygwin@cygwin.com
> Subject: Re: Open bash at the current explorer directory?
> 
> 
> Gunnar schrieb:
> 
> > It still works if I choose a folder, byt not a drive!
> 
> Wow, what a thread... I missed it.
> I have a package online to deal with this (drives & folders, 
> including a
> little setup script), this version is for 'bash only', but can be
> customized: http://koeln.convey.de/cywgin/CygwinPromptHere/
> 
> I gives an entry in the context-sensitive Explorer right 
> click menu and
> a batch file in the Cygwin root directory, modify the batch 
> file to start
> your favorite terminal (e.g. rxvt) in your favorite colors.
> 
> 
> HTH,
> 
> Gerrit
> -- 
> =^..^=
> 
> 
> --
> 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/
> 
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Open bash at the current explorer directory?
@ 2002-09-30  4:25 Gunnar Boström
  2002-09-30  6:16 ` Gerrit P. Haase
  0 siblings, 1 reply; 28+ messages in thread
From: Gunnar Boström @ 2002-09-30  4:25 UTC (permalink / raw)
  To: cygwin

I don't think that cygwin kicks in at all.
I added that line in both .profile and .bashrc but there was no output in the log.
It still works if I choose a folder, byt not a drive!
:-?


> -----Original Message-----
> From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu] 
> Sent: den 27 september 2002 15:30
> To: Gunnar Boström
> Cc: cygwin@cygwin.com
> Subject: RE: Open bash at the current explorer directory?
> 
> 
> Gunnar,
> 
> I suggest putting an 'echo "$CYGWINSTARTHERE" >> 
> /var/log/bashhere.log' in
> your .bashrc before the 'cd' line.  Then, when you know exactly which
> value $CYGWINSTARTHERE gets, try running your command with 
> that value from
> the cmd.exe window, and see what it says...
> Once you've debugged this, don't forget to remove the 'echo' :-)
> 	Igor
> 
> On Fri, 27 Sep 2002, [iso-8859-1] Gunnar Boström wrote:
> 
> > Thanks Igor, it works with the cygpath that you sent me.
> >
> > I have still one little problem.  I can't get it to work 
> when I select a
> > drive.  I get a DOS window where some text flies by, I 
> think it's the
> > output from env, and then the window disappears.
> >
> > It works fine when I select a directory
> >
> > I have the following command in the registry (windows XP 
> pro) for both
> > Directory and Drive.
> >
> > env.exe  CYGWINSTARTHERE="%1" bash --login
> >
> > Suggestions?
> > :-)
> >
> > > -----Original Message-----
> > > From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu]
> > > Sent: den 26 september 2002 16:24
> > > To: Gunnar Boström
> > > Cc: cygwin@cygwin.com
> > > Subject: RE: Open bash at the current explorer directory?
> > >
> > >
> > > Oops, just re-read this...  Brrrr, should drink more coffee before
> > > replying to mails...  Here's another try:
> > >
> > > Gunnar,
> > > Converting short paths to long is exactly the intent of the
> > > `cygpath -w
> > > -l` line.  However, the cygpath executable in the current
> > > distribution of
> > > cygwin doesn't work.  You can simply recompile cygpath from
> > > the sources,
> > > or use the executable in the previous message (I've posted it
> > > once before,
> > > too, so you can search the archives).  The latter does
> > > involve some degree
> > > of trust... :-D
> > > Hope this is more readable.
> > >       Igor
> > >
> > > On Thu, 26 Sep 2002, Igor Pechtchanski wrote:
> > >
> > > > Gunnar,
> > > > This is exactly what the `cygpath -w -l` is supposed to do.
> > >  The problem
> > > > is that I forgot that the currently compiled cygpath is
> > > buggy (not sure
> > > > why, recompiling it from 1.3.12-4 sources works).  
> Either recompile
> > > > cygpath, or use the attached binary (compiled on Win2k,
> > > don't know if it
> > > > matters).
> > > >         Igor
> > > >
> > > > On Thu, 26 Sep 2002, [iso-8859-1] Gunnar Boström wrote:
> > > >
> > > > > I only have ntsec in $CYGWIN.
> > > > > I tried your advise below but "cygpath -w -l" returns garbage!
> > > > > The very first problem is that env CFH="%1" in the
> > > register inserts the
> > > > > short windows form.  Is it possible to force windows to
> > > insert the long
> > > > > form?
> > > > > :-)
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu]
> > > > > > Sent: den 25 september 2002 23:02
> > > > > > To: Gunnar Boström
> > > > > > Cc: cygwin@cygwin.com
> > > > > > Subject: RE: Open bash at the current explorer directory?
> > > > > >
> > > > > >
> > > > > > Gunnar,
> > > > > > I assume your $CYGWIN contains "check_case:strict",
> > > since that is the
> > > > > > setting in which the short paths won't work.  They will work
> > > > > > if $CYGWIN
> > > > > > contains "check_case:adjust".  So, you can use the following
> > > > > > sequence in
> > > > > > your .bashrc to get the correct form of the windows path:
> > > > > >
> > > > > > if [ -n "$CFH" ] ; then
> > > > > >    CFH="$(export CYGWIN="$CYGWIN check_case:adjust";cygpath
> > > > > > -w -l "$CFH")"
> > > > > >    cd "$CFH"
> > > > > >    unset CFH
> > > > > > fi
> > > > > >
> > > > > > Hope this helps,
> > > > > >       Igor
> > > > > >
> > > > > > On Wed, 25 Sep 2002, [iso-8859-1] Gunnar Boström wrote:
> > > > > >
> > > > > > > This works fine except that I get the windows short
> > > form of the
> > > > > > > directories in the CFH variable.
> > > > > > > I've tried filtering through cygpath but no luck.
> > > > > > > Any suggestion?
> > > > > > >
> > > > > > > :-?
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Frantisek Dufka [mailto:dufkaf@seznam.cz]
> > > > > > > > Sent: den 18 september 2002 10:56
> > > > > > > > To: cygwin@cygwin.com
> > > > > > > > Subject: Re: Open bash at the current explorer 
> directory?
> > > > > > > >
> > > > > > > >
> > > > > > > > I don't know how to do it without using 
> .bashrc, but this
> > > > > > > > works for me
> > > > > > > > (current cygwin, NT 4.0)
> > > > > > > >
> > > > > > > > Registry key contains:
> > > > > > > >
> > > > > > > > D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn 
> fixedsys -fg
> > > > > > > > gray -bg black
> > > > > > > > -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 cd
> > > > > > > > command.
> > > > > > > >
> > > > > > > > Frantisek
> > > > > > > >
> > > > > > > > -------------------------------------
> > > > > > > > * John Daniel Doucette <john.doucette@jjmackay.ca>
> > > > > > [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 similar
> > > > > > > > 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 custom
> > > > > > > >  > "open with cygwin" option, and have the bash
> > > shell open at that
> > > > > > > >  > directory.  Has anyone tried this?
> > > > > > > >
> > > > > > > > Read this from the archive.
> > > > > > > > http://www.cygwin.com/ml/cygwin/2002-05/msg01648.html
> > > > > > > >
> > > > > > > > HTH
> > > > > > > > Jens
> > > >
> > > >
> > >
> > > --
> > >                               http://cs.nyu.edu/~pechtcha/
> > >       |\      _,,,---,,_              pechtcha@cs.nyu.edu
> > > ZZZzz /,`.-'`'    -.  ;-;;,_          igor@watson.ibm.com
> > >      |,4-  ) )-,_. ,\ (  `'-'         Igor Pechtchanski
> > >     '---''(_/--'  `-'\_) fL   a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> > >
> > > "Water molecules expand as they grow warmer" (C) Popular
> > > Science, Oct'02, p.51
> > >
> > >
> > >
> > >
> >
> > --
> > 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/
> >
> >
> 
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha@cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> "Water molecules expand as they grow warmer" (C) Popular 
> Science, Oct'02, p.51
> 
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Open bash at the current explorer directory?
@ 2002-09-27  2:49 Gunnar Boström
  2002-09-27  7:12 ` Igor Pechtchanski
  0 siblings, 1 reply; 28+ messages in thread
From: Gunnar Boström @ 2002-09-27  2:49 UTC (permalink / raw)
  To: cygwin

Thanks Igor, it works with the cygpath that you sent me.

I have still one little problem. 
I can't get it to work when I select a drive. 
I get a DOS window where some text flies by, I think it's the output from env, 
and then the window disappears.
 
It works fine when I select a directory
I have the following command in the registry (windows XP pro) for both Directory and Drive.

env.exe  CYGWINSTARTHERE="%1" bash --login

Suggestions?
:-)

> -----Original Message-----
> From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu] 
> Sent: den 26 september 2002 16:24
> To: Gunnar Boström
> Cc: cygwin@cygwin.com
> Subject: RE: Open bash at the current explorer directory?
> 
> 
> Oops, just re-read this...  Brrrr, should drink more coffee before
> replying to mails...  Here's another try:
> 
> Gunnar,
> Converting short paths to long is exactly the intent of the 
> `cygpath -w
> -l` line.  However, the cygpath executable in the current 
> distribution of
> cygwin doesn't work.  You can simply recompile cygpath from 
> the sources,
> or use the executable in the previous message (I've posted it 
> once before,
> too, so you can search the archives).  The latter does 
> involve some degree
> of trust... :-D
> Hope this is more readable.
> 	Igor
> 
> On Thu, 26 Sep 2002, Igor Pechtchanski wrote:
> 
> > Gunnar,
> > This is exactly what the `cygpath -w -l` is supposed to do. 
>  The problem
> > is that I forgot that the currently compiled cygpath is 
> buggy (not sure
> > why, recompiling it from 1.3.12-4 sources works).  Either recompile
> > cygpath, or use the attached binary (compiled on Win2k, 
> don't know if it
> > matters).
> >         Igor
> >
> > On Thu, 26 Sep 2002, [iso-8859-1] Gunnar Boström wrote:
> >
> > > I only have ntsec in $CYGWIN.
> > > I tried your advise below but "cygpath -w -l" returns garbage!
> > > The very first problem is that env CFH="%1" in the 
> register inserts the
> > > short windows form.  Is it possible to force windows to 
> insert the long
> > > form?
> > > :-)
> > >
> > > > -----Original Message-----
> > > > From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu]
> > > > Sent: den 25 september 2002 23:02
> > > > To: Gunnar Boström
> > > > Cc: cygwin@cygwin.com
> > > > Subject: RE: Open bash at the current explorer directory?
> > > >
> > > >
> > > > Gunnar,
> > > > I assume your $CYGWIN contains "check_case:strict", 
> since that is the
> > > > setting in which the short paths won't work.  They will work
> > > > if $CYGWIN
> > > > contains "check_case:adjust".  So, you can use the following
> > > > sequence in
> > > > your .bashrc to get the correct form of the windows path:
> > > >
> > > > if [ -n "$CFH" ] ; then
> > > >    CFH="$(export CYGWIN="$CYGWIN check_case:adjust";cygpath
> > > > -w -l "$CFH")"
> > > >    cd "$CFH"
> > > >    unset CFH
> > > > fi
> > > >
> > > > Hope this helps,
> > > >       Igor
> > > >
> > > > On Wed, 25 Sep 2002, [iso-8859-1] Gunnar Boström wrote:
> > > >
> > > > > This works fine except that I get the windows short 
> form of the
> > > > > directories in the CFH variable.
> > > > > I've tried filtering through cygpath but no luck.
> > > > > Any suggestion?
> > > > >
> > > > > :-?
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Frantisek Dufka [mailto:dufkaf@seznam.cz]
> > > > > > Sent: den 18 september 2002 10:56
> > > > > > To: cygwin@cygwin.com
> > > > > > Subject: Re: Open bash at the current explorer directory?
> > > > > >
> > > > > >
> > > > > > I don't know how to do it without using .bashrc, but this
> > > > > > works for me
> > > > > > (current cygwin, NT 4.0)
> > > > > >
> > > > > > Registry key contains:
> > > > > >
> > > > > > D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn fixedsys -fg
> > > > > > gray -bg black
> > > > > > -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 cd
> > > > > > command.
> > > > > >
> > > > > > Frantisek
> > > > > >
> > > > > > -------------------------------------
> > > > > > * John Daniel Doucette <john.doucette@jjmackay.ca>
> > > > [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 similar
> > > > > > 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 custom
> > > > > >  > "open with cygwin" option, and have the bash 
> shell open at that
> > > > > >  > directory.  Has anyone tried this?
> > > > > >
> > > > > > Read this from the archive.
> > > > > > http://www.cygwin.com/ml/cygwin/2002-05/msg01648.html
> > > > > >
> > > > > > HTH
> > > > > > Jens
> >
> >
> 
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha@cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> "Water molecules expand as they grow warmer" (C) Popular 
> Science, Oct'02, p.51
> 
> 
> 
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Open bash at the current explorer directory?
@ 2002-09-25  1:44 Gunnar Boström
  2002-09-25 16:02 ` Igor Pechtchanski
  0 siblings, 1 reply; 28+ messages in thread
From: Gunnar Boström @ 2002-09-25  1:44 UTC (permalink / raw)
  To: cygwin

This works fine except that I get the windows short form of the 
directories in the CFH variable.
I've tried filtering through cygpath but no luck.
Any suggestion?

:-?

> -----Original Message-----
> From: Frantisek Dufka [mailto:dufkaf@seznam.cz] 
> Sent: den 18 september 2002 10:56
> To: cygwin@cygwin.com
> Subject: Re: Open bash at the current explorer directory?
> 
> 
> I don't know how to do it without using .bashrc, but this 
> works for me 
> (current cygwin, NT 4.0)
> 
> Registry key contains:
> 
> D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn fixedsys -fg 
> gray -bg black 
> -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 cd 
> command.
> 
> Frantisek
> 
> -------------------------------------
> * John Daniel Doucette <john.doucette@jjmackay.ca> [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 similar 
> 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 custom
>  > "open with cygwin" option, and have the bash shell open at that
>  > directory.  Has anyone tried this?
> 
> Read this from the archive.
> http://www.cygwin.com/ml/cygwin/2002-05/msg01648.html
> 
> HTH
> Jens
> 
> 

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Open bash at the current explorer directory?
@ 2002-09-19 10:01 Tackett, Galen
  2002-09-19 10:59 ` Igor Pechtchanski
  0 siblings, 1 reply; 28+ messages in thread
From: Tackett, Galen @ 2002-09-19 10:01 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

I must be missing something.

I added the registry entries plus the profile entries, both for
/etc/.profile and ~/.profile.

Now, the right-button menu command "Open with command prompt" works just
wonderfully (if the resulting cmd.exe window can actually be described with
that word), but "Open with Cygwin shell (rxvt)" just gets me an error window
showing (in the title bar) the path of the folder I tried to use, and the
error message "This file does not have a program associated with it for
performing this action. Create an association in the Folder Options control
panel."

(By the way, when John's message says .profile I assume he means
.bash_profile since the registry mods invoke bash?  Out of sheer ignorance
(I'm not a unix or shell weenie at all) I just added the .profile stuff to
both files.)

John Doucette wrote:

> Sorry Frantisek et al,
>
> Mea culpa. You are correct.  I was not using a .profile at all, thanks for

> pointing out the problem.  I have rearranged things and retested with a 
> .profile.  I placed
>
> (etc)

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
[parent not found: <000701c25fbc$ef4bd550$5365060a@franta>]
* Open bash at the current explorer directory?
@ 2002-09-18 14:03 John Daniel Doucette
  0 siblings, 0 replies; 28+ messages in thread
From: John Daniel Doucette @ 2002-09-18 14:03 UTC (permalink / raw)
  To: cygwin; +Cc: pechtcha

Igor,

With all the great info on the mailing list and some research on my own, 
this is the registry file I came up with to open a cygwin rxvt shell at the 
current explorer directory/drive.  It also includes the option to open a 
Command prompt at the explorer directory/drive (Horrors!).  It works under 
Win2000 SP3.  For XP, just replace the WINNT path segments (2!) with 
WINDOWS.  The first invocation of bash loads all the profile information 
but is not interactive so that it can CD to the right directory, then exec 
replaces the current shell without reading any profile information.  I 
diff'ed a PRINTENV output before and after the exec command and they proved 
to be the same.  My bashrc only gets executed once in this case. Hope this 
provides more info. I am still trying to figure out how to get those cute 
little icons in the context menu though!  All the keys have "Custom_" in 
their names to make them easy to find and remove if you don't like their 
function.

====================File: OpenWith.reg,  CUT HERE ===========================
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCommandPrompt]
@="Open with Command Prompt"

[HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCommandPrompt\command]
@="c:\\WINNT\\system32\\cmd.exe %1"

[HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCygwinShell]
@="Open with Cygwin Shell (rxvt)"

[HKEY_CLASSES_ROOT\Directory\shell\Custom_OpenWithCygwinShell\command]
@="C:\\cygwin\\bin\\rxvt.exe -geometry 96x76+800+5 -fg gray -bg black -fn 
Fixedsys-8 -sl 2500 -sr -tn cygwin -e c:/cygwin/bin/bash --login -c \"cd 
'%1'; exec bash --noprofile --norc -i\""

[HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCommandPrompt]
@="Open with Command Prompt"

[HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCommandPrompt\command]
@="c:\\WINNT\\system32\\cmd.exe /F:ON %1"

[HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCygwinShell]
@="Open with Cygwin Shell (rxvt)"

[HKEY_CLASSES_ROOT\Drive\shell\Custom_OpenWithCygwinShell\command]
@="C:\\cygwin\\bin\\rxvt.exe -geometry 96x76+800+5 -fg gray -bg black -fn 
Fixedsys-8 -sl 2500 -sr -tn cygwin -e c:/cygwin/bin/bash --login -c \"cd 
'%1'; exec bash --noprofile --norc -i\""
====================  CUT HERE ===========================

===================================
John Daniel Doucette, Sr. Software Designer

J. J. MacKay Canada Limited
Halifax R & D Office
1046 Barrington Street, 1st Floor
Halifax, Nova Scotia
Canada
B3H 2R1

Phone: 902.423.7727  x222
Fax:     902.422.8108
Web:    www . jjmackay . ca
Email:  john . doucette @ jjmackay . ca
===================================


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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Open bash at the current explorer directory?
@ 2002-09-18  4:30 John Vincent
  2002-09-18  4:42 ` Frantisek Dufka
  0 siblings, 1 reply; 28+ messages in thread
From: John Vincent @ 2002-09-18  4:30 UTC (permalink / raw)
  To: dufkaf, marcos; +Cc: cygwin

Hi,

Here is an alternative that has also been posted before, that also
works when it's a disk drive rather than a directory. Does
this work any better for you? (Both work fine for me on W2K SP3)

/John Vincent

----------------------------------------------
REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\rxvtHere]
@="r&xvtHere"

[HKEY_CLASSES_ROOT\Directory\shell\rxvtHere\command]
@="C:\\CYGWIN\\BIN\\rxvt.exe -sr -ut -tn rxvt -bg black -fg grey -fn 
\"Courier-16\" -sl 2000 -e /usr/bin/bash --login -i -c \"cd '%1';echo 
'%1';exec bash --rcfile ~/.profile -i\""

[HKEY_CLASSES_ROOT\Drive\shell\rxvtHere]
@="r&xvtHere"

[HKEY_CLASSES_ROOT\Drive\shell\rxvtHere\command]
@="C:\\CYGWIN\\BIN\\rxvt.exe -sr -ut -tn rxvt -bg black -fg grey -fn 
\"Courier-16\" -sl 2000 -e /usr/bin/bash --login -i -c \"cd '%1';echo 
'%1';exec bash --rcfile ~/.profile -i\""
---------------------------------------------

>From: "Frantisek Dufka" <dufkaf@seznam.cz>
>To: "Marcos Lorenzo de Santiago" <marcos@it.uc3m.es>
>CC: <cygwin@cygwin.com>
>Subject: Re: Open bash at the current explorer directory?
>Date: Wed, 18 Sep 2002 12:42:09 +0200
>
>Sure. We are both talking about following key, right?
>
>Windows Registry Editor Version 5.00
>
>[HKEY_CLASSES_ROOT\Directory\shell\0cmd-rxvt]
>@="Open rxvt Window Here"
>
>[HKEY_CLASSES_ROOT\Directory\shell\0cmd-rxvt\command]
>@="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 :)
>
>Frantisek
>
>----- Original Message -----
>From: "Marcos Lorenzo de Santiago" <marcos@it.uc3m.es>
>To: "Frantisek Dufka" <dufkaf@seznam.cz>
>Cc: <cygwin@cygwin.com>
>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
>me
>      > (current cygwin, NT 4.0)
>      >
>      > Registry key contains:
>      >
>      > D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn fixedsys -fg gray -bg
>black
>      > -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
>cd
>      > 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.
>
>rgrds,
>m4c.
>
>
>      >
>      > Frantisek
>      >
>      > -------------------------------------
>      > * John Daniel Doucette <john.doucette@jjmackay.ca> [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
>similar
>      > 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
>custom
>      >  > "open with cygwin" option, and have the bash shell open at that
>      >  > directory.  Has anyone tried this?
>      >
>      > Read this from the archive.
>      > http://www.cygwin.com/ml/cygwin/2002-05/msg01648.html
>      >
>      > 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:      http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting:         http://cygwin.com/bugs.html
>Documentation:         http://cygwin.com/docs.html
>FAQ:                   http://cygwin.com/faq/




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Open bash at the current explorer directory?
@ 2002-09-18  2:09 Frantisek Dufka
  2002-09-18  2:14 ` Marcos Lorenzo de Santiago
  0 siblings, 1 reply; 28+ messages in thread
From: Frantisek Dufka @ 2002-09-18  2:09 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

I don't know how to do it without using .bashrc, but this works for me 
(current cygwin, NT 4.0)

Registry key contains:

D:\cygwin\bin\rxvt.exe -sb -sr -sl 16384 -fn fixedsys -fg gray -bg black 
-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 cd 
command.

Frantisek

-------------------------------------
* John Daniel Doucette <john.doucette@jjmackay.ca> [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 similar 
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 custom
 > "open with cygwin" option, and have the bash shell open at that
 > directory.  Has anyone tried this?

Read this from the archive.
http://www.cygwin.com/ml/cygwin/2002-05/msg01648.html

HTH
Jens


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3237 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Open bash at the current explorer directory?
@ 2002-09-13  6:34 Vince Hoffman
  0 siblings, 0 replies; 28+ messages in thread
From: Vince Hoffman @ 2002-09-13  6:34 UTC (permalink / raw)
  To: 'John Daniel Doucette', cygwin

yes this was discussed not that long ago. have a quick search of the
archives.

-----Original Message-----
From: John Daniel Doucette [mailto:john.doucette@jjmackay.ca]
Sent: 13 September 2002 14:24
To: cygwin@cygwin.com
Subject: Open bash at the current explorer directory?


Hello,

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 similar 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 custom 
"open with cygwin" option, and have the bash shell open at that 
directory.  Has anyone tried this?

===================================
John Daniel Doucette, Sr. Software Designer

J. J. MacKay Canada Limited
Halifax R & D Office
1046 Barrington Street, 1st Floor
Halifax, Nova Scotia
Canada
B3H 2R1

Phone: 902.423.7727  x222
Fax:     902.422.8108
Web:    www . jjmackay . ca
Email:  john . doucette @ jjmackay . ca
===================================


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

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

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Open bash at the current explorer directory?
@ 2002-09-13  6:33 John Daniel Doucette
  2002-09-13 10:46 ` Tim Beuman
  2002-09-16  8:42 ` Jens Schuessler
  0 siblings, 2 replies; 28+ messages in thread
From: John Daniel Doucette @ 2002-09-13  6:33 UTC (permalink / raw)
  To: cygwin

Hello,

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 similar 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 custom 
"open with cygwin" option, and have the bash shell open at that 
directory.  Has anyone tried this?

===================================
John Daniel Doucette, Sr. Software Designer

J. J. MacKay Canada Limited
Halifax R & D Office
1046 Barrington Street, 1st Floor
Halifax, Nova Scotia
Canada
B3H 2R1

Phone: 902.423.7727  x222
Fax:     902.422.8108
Web:    www . jjmackay . ca
Email:  john . doucette @ jjmackay . ca
===================================


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

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2002-09-30 14:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-26  0:48 Open bash at the current explorer directory? Gunnar Boström
2002-09-26  7:31 ` Open bash@the " Igor Pechtchanski
2002-09-26  8:00   ` Open bash at the " Igor Pechtchanski
  -- strict thread matches above, loose matches on Subject: below --
2002-09-30  9:57 Gunnar Boström
2002-09-30 10:00 ` Christopher Faylor
2002-09-30  4:25 Gunnar Boström
2002-09-30  6:16 ` Gerrit P. Haase
2002-09-27  2:49 Gunnar Boström
2002-09-27  7:12 ` Igor Pechtchanski
2002-09-25  1:44 Gunnar Boström
2002-09-25 16:02 ` Igor Pechtchanski
2002-09-19 10:01 Tackett, Galen
2002-09-19 10:59 ` Igor Pechtchanski
2002-09-19 11:38   ` Michael A Chase
2002-09-21 10:52     ` Nicholas Wourms
     [not found] <000701c25fbc$ef4bd550$5365060a@franta>
2002-09-19  8:12 ` John Daniel Doucette
2002-09-18 14:03 John Daniel Doucette
2002-09-18  4:30 John Vincent
2002-09-18  4:42 ` Frantisek Dufka
2002-09-18  8:26   ` Igor Pechtchanski
2002-09-18  2:09 Frantisek Dufka
2002-09-18  2:14 ` Marcos Lorenzo de Santiago
2002-09-18  4:17   ` Frantisek Dufka
2002-09-13  6:34 Vince Hoffman
2002-09-13  6:33 John Daniel Doucette
2002-09-13 10:46 ` Tim Beuman
2002-09-13 11:15   ` Igor Pechtchanski
2002-09-16  8:42 ` Jens Schuessler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).