I would like to add a contextual menu to the Windows Explorer, to open
mintty in the current directory.
Similar to what has already been done here with a simple bash shell :
http://dam.mellis.org/2004/06/open_cygwin_bash_shell_here/
Unfortunately I could not find the documentation regarding mintty
parameters and I have no idea how to specify a directory in which
mintty should start the shell (note that it would be nice to keep the
single dash "-" argument to keep profile/shell preferences while just
overriding the current directory).
Thanks for your help !
Olivier
PS: If there are a documentation regarding mintty parameters, it would
be nice to add it in the google code main page and enable a "usage"
when executing the windows command : ("mintty.exe /help", "mintty -h"
or "mintty --help")
--
You received this message because you are subscribed to the Google Groups "mintty" group.
To post to this group, send email to mintty-...@googlegroups.com.
To unsubscribe from this group, send email to mintty-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mintty-discuss?hl=en.
Thank you for this suggestion !
I could not get "chere" to work properly on my system (even when using
administrator account) but it gave me the answer to what I was looking
for :
Using the "-p" argument on 'chere' prints the registry keys that would
have been installed by chere/regtool :
--------
$ chere -i -ap -t mintty -e "Open mintty here"
[...]
regtool -e set /HKCR/Directory/Shell/cygwin_bash/command/ "C:\cygwin
\bin\mintty.exe -e /bin/xhere /bin/bash.exe \"%L\""
[...]
--------
As you can see, 'chere' install and uses 'xhere' when invoking the
terminal to launch (in my case mintty).
Thus, here is the registry file to install a contextual menu to open
mintty with the specified directory :
-----------
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\mintty]
@="Open mintty Here"
[HKEY_CLASSES_ROOT\Directory\shell\mintty\command]
@="c:\\cygwin\\bin\\mintty.exe -e /bin/xhere /bin/bash.exe \"%L\""
[HKEY_CLASSES_ROOT\Drive\shell\mintty]
@="Open mintty Here"
[HKEY_CLASSES_ROOT\Drive\shell\mintty\command]
@="c:\\cygwin\\bin\\mintty.exe -e /bin/xhere /bin/bash.exe \"%L\""
-----------
Regards,
Olivier
On Feb 17, 3:38 pm, Forrest Humphrey <forrest.humph...@gmail.com>
wrote:
> Hi Olivier,
>
> I wonder if the the cygwin package "chere" would come close to meeting your
> needs.
>
> $ chere -i -t mintty -s bash
>
> This will add a context menu item "Bash Prompt Here" when right-clicking on
> a directory. I haven't found a way to activate mintty from an already-open
> directory, but using chere as described has been sufficient for me.
>
> Regards,
> Forrest Humphrey
>
> On Wed, Feb 17, 2010 at 7:59 AM, Olivier Jaquemet <
>
> olivier.jaque...@gmail.com> wrote:
> > Hello All,
>
> > I would like to add a contextual menu to the Windows Explorer, to open
> > mintty in the current directory.
> > Similar to what has already been done here with a simple bash shell :
> >http://dam.mellis.org/2004/06/open_cygwin_bash_shell_here/
>
> > Unfortunately I could not find the documentation regarding mintty
> > parameters and I have no idea how to specify a directory in which
> > mintty should start the shell (note that it would be nice to keep the
> > single dash "-" argument to keep profile/shell preferences while just
> > overriding the current directory).
>
> > Thanks for your help !
>
> > Olivier
>
> > PS: If there are a documentation regarding mintty parameters, it would
> > be nice to add it in the google code main page and enable a "usage"
> > when executing the windows command : ("mintty.exe /help", "mintty -h"
> > or "mintty --help")
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "mintty" group.
> > To post to this group, send email to mintty-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > mintty-discus...@googlegroups.com<mintty-discuss%2Bunsu...@googlegroups.com>
Forrest already pointed you at 'chere'. (The TIPS section of the
mintty manual mentions it too.)
> Unfortunately I could not find the documentation regarding mintty
> parameters
'man mintty', if you've installed mintty via Cygwin's setup.exe.
Otherwise, there's a PDF version of the manual at
http://mintty.googlecode.com/files/mintty-0.5.7.pdf. (I've now added a
paragraph to the homepage to point these out.)
> I have no idea how to specify a directory in which
> mintty should start the shell
> (note that it would be nice to keep the
> single dash "-" argument to keep profile/shell preferences while just
> overriding the current directory).
The default /etc/profile overrides the working directory anyway, but
have a look at it to see how 'chere' works around that.
> PS: If there are a documentation regarding mintty parameters, it would
> be nice to add it in the google code main page and enable a "usage"
> when executing the windows command : ("mintty.exe /help", "mintty -h"
> or "mintty --help")
-H and --help are both supported (and incidentally the --help output
does appear in the screenshot on the homepage). Unfortunately I just
found that this doesn't work when mintty is invoked from a console
rather than a pty-based terminal such as mintty itself. Issue 163.
Andy
To all users : check my reply to Forrest in this thread if you want
more information on how to use chere (or rather "workaround it" when
it does not work...).
Regards,
Olivier
$ chere -h/usr/bin/chere version 1.2Usage:/usr/bin/chere -<iuxlrhv> [-lracnmpf12] [-t <term>] [-s <shell>][-d <display> ] [-o <options>] [-e <menutext>]Adds the stated terminal/shell combination to the folder context menuThis allows you to right click a folder in Windows Explorer and opena Cygwin shell in that folder.[...]t <term> - Use terminal term. Supported terminals are:cmd rxvt mintty xterm urxvts <shell> - Use the named shell. Supported shells are:ash bash cmd dash mksh pdksh posh tcsh zsh passwd[...]
--
You received this message because you are subscribed to the Google Groups "mintty" group.
To post to this group, send email to mintty-...@googlegroups.com.
To unsubscribe from this group, send email to mintty-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/mintty-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.