'mintty' instead of CMD?

1,565 views
Skip to first unread message

Vit Gottwald

unread,
May 22, 2011, 11:09:24 AM5/22/11
to msy...@googlegroups.com
Hello there,

First of all *big thanks* for msysGIT. I love it!

However, I didn’t like that I had to use the windows CMD window with
MSGIT. So I tried mintty
(http://code.google.com/p/mintty/downloads/detail?name=mintty-0.9.8-msys.zip&can=2&q=
). After donloading it I put it to msysGIT’s /bin path, and created a
mintty.lnk to execute it - “C:\GIT\bin\mintty.exe /bin/sh -l –I”. It
worked like a charm and the terminal behaved as one would expect
compared to CMD (copy, paste, scroll, resize, context menu). The best
part for mi is that it is XTERM compatible so one can even used it
afte ssh-ing to remote hosts without problems with programs not
knowing ‘cygwin’ terminal.

It is also a MSYS package that can be installed via ‘mingw-get install
mutty’ in the standard MSYS distribution.

How about bundling mintty with msysGIT and making it the default terminal?

Thanks,

Vit

Johannes Schindelin

unread,
May 22, 2011, 11:58:33 AM5/22/11
to Vit Gottwald, msy...@googlegroups.com
Hi Vit,

On Sun, 22 May 2011, Vit Gottwald wrote:

> First of all *big thanks* for msysGIT. I love it!
>
> However, I didn’t like that I had to use the windows CMD window with
> MSGIT. So I tried mintty
> (http://code.google.com/p/mintty/downloads/detail?name=mintty-0.9.8-msys.zip&can=2&q=
> ). After donloading it I put it to msysGIT’s /bin path, and created a
> mintty.lnk to execute it - “C:\GIT\bin\mintty.exe /bin/sh -l –I”. It
> worked like a charm and the terminal behaved as one would expect
> compared to CMD (copy, paste, scroll, resize, context menu). The best
> part for mi is that it is XTERM compatible so one can even used it
> afte ssh-ing to remote hosts without problems with programs not
> knowing ‘cygwin’ terminal.

Good to hear. Does paging work, too? I.e. Does "cd / && git log" just
woosh by, or does it stop after a screenful?

> It is also a MSYS package that can be installed via ‘mingw-get install
> mutty’ in the standard MSYS distribution.

Unfortunately, it is not that easy. There was somebody else who suggested
that mingw-get is idiot-proof to set up. Well, I proved the opposite: I
could not get it to work in the msysGit setting (whenever I called the
bash obtained via mingw-get, even after closing msysGit, it failed with
that dreaded "assertion failed" error).

But that should not hinder us in the endeavor to include it into msysGit
if it is indeed as useful as you say.

> How about bundling mintty with msysGIT and making it the default
> terminal?

For this to happen, we'd need to build it ourselves. Could you try to
build mintty in msysGit? If yes, please write down all your steps (or save
the bash history) so that we can turn the procedure into a
/src/mintty/release.sh script that downloads, builds, installs and commits
mintty.exe.

Thanks!
Johannes

Gottwald, Vit

unread,
May 23, 2011, 5:35:49 AM5/23/11
to msy...@googlegroups.com

Hello there,

 

First of all *big thanks* for msysGIT. I love it!

 

However, I didn’t like that I had to use the windows CMD window with MSGIT. So I tried mintty (http://code.google.com/p/mintty/downloads/detail?name=mintty-0.9.8-msys.zip&can=2&q= ). After donloading it and putting it to msysGIT’s /bin and creating a mintty.lnk to execute it “C:\GIT\bin\mintty.exe /bin/sh -l –I”, it works like a charm and the terminal behaves as one would expect compared to CMD  (copy, paste, scroll, resize, context menu) and it is XTERM compatible so one can even used it afte ssh-ing to remote hosts without problems with programs not knowing ‘cygwin’ terminal.

It is also a MSYS package that can be installed via ‘mingw-get install mutty’ in the standard MSYS distribution.

 

How about bundling mintty with msysGIT and making it the default terminal?

 

Thanks,

 

Vit

Vit Gottwald
CA Technologies
Sr. Software Engineer
Tel:      +420 226 205 897
mailto:Vit.Go...@ca.com  
Logo

CA CZ, s.r.o.
V Parku 2316/12,  
148 00 Praha 4
Identifikacni cislo: 256 94 073

 

image001.jpg

Will Rogers

unread,
May 23, 2011, 12:55:09 PM5/23/11
to msysGit
On May 22, 11:58 am, Johannes Schindelin <Johannes.Schinde...@gmx.de>
wrote:
> Good to hear. Does paging work, too? I.e. Does "cd / && git log" just
> woosh by, or does it stop after a screenful?

I have tried to configure mintty w/ msysgit also, and paging does not
work, nor does output get colored. It's a shame, because mintty is a
better experience than other terminals in every other way. If there's
anything that can be done to fix this, I would love it see it happen.


-- Will

Johannes Schindelin

unread,
May 23, 2011, 4:31:33 PM5/23/11
to Will Rogers, msysGit
Hi,

The first step probably would be to try to build "less" in the 'msys'
branch. Then we could try to detect the presence of mintty and fix the
paging. After that, it should be possible to fix the coloring.

To be quite clear: this is not a small project. A decent developer will
probably spend more than a week on this.

Ciao,
Johannes

Johannes Sixt

unread,
May 23, 2011, 4:55:22 PM5/23/11
to Johannes Schindelin, Will Rogers, msysGit
Am 23.05.2011 22:31, schrieb Johannes Schindelin:
> The first step probably would be to try to build "less" in the 'msys'
> branch. Then we could try to detect the presence of mintty and fix the
> paging. After that, it should be possible to fix the coloring.

less is not the only program that colors its output, git itself does,
too, for example git branch. You would have to adjust isatty() to detect
mintty as well... I fear that means piling work-around on top of
work-around.

-- Hannes

Johannes Schindelin

unread,
May 23, 2011, 5:46:37 PM5/23/11
to Johannes Sixt, Will Rogers, msysGit
Hi,

Yes, less is not the only program, and git also needs a patch.

But.

If mintty is really that nice, there will certainly be people willing to
put in the work to get things to run.

Or am I wrong?
Johannes

Vit Gottwald

unread,
May 23, 2011, 6:16:43 PM5/23/11
to Johannes Schindelin, msy...@googlegroups.com
Hello Johannes,

> Good to hear. Does paging work, too? I.e. Does "cd / && git log" just
> woosh by, or does it stop after a screenful?

Running this command just scrolls all the text. I don't see what git
does differently, less by itself works just fine. I looked into the
doc for git config core.pager and played with the FSRX swithes, but
without success.

I also did some more research and it seems that native windows console
applications have problem with the true XTERM instead of windows
console. For me that means VIM, so I have a script to run gvim
instead. That could be a real drawback for others. However, the
benefit for SSHing to remote host with correct XTERM overweights it
for me. Here is a thread that discusses the problem
http://code.google.com/p/mintty/issues/detail?id=56

>> How about bundling mintty with msysGIT and making it the default
>> terminal?
>
> For this to happen, we'd need to build it ourselves. Could you try to
> build mintty in msysGit? If yes, please write down all your steps (or save
> the bash history) so that we can turn the procedure into a
> /src/mintty/release.sh script that downloads, builds, installs and commits
> mintty.exe.

I tried to compile it, but there are issues ... as you probably
expected. I spent a while researching it but without success. I guess
for my purposes I'll stick with the binary and try to fix the compile
problems some time later when I have a while. If I succeed, I'll
definitely let you know.

Sorry for raising hopes without a result. I find mintty very useful
and thought others might as well. Including it with msysGit would be a
nice bonus, but I understand someone has to do it.

Regards,
Vit

Sebastian Schuberth

unread,
May 24, 2011, 3:37:44 AM5/24/11
to Vit Gottwald, Johannes Schindelin, msy...@googlegroups.com
On 24.05.2011 00:16, Vit Gottwald wrote:

> instead. That could be a real drawback for others. However, the
> benefit for SSHing to remote host with correct XTERM overweights it
> for me. Here is a thread that discusses the problem
> http://code.google.com/p/mintty/issues/detail?id=56
>
>>> How about bundling mintty with msysGIT and making it the default
>>> terminal?

I was also already thinking about this, and took part in the discussion
in the above mintty issue tracker thread.

Finally, I came to the conclusion that it's too hard to make mintty work
with msysgit. And IMHO, using mintty (although it's a great terminal)
also is a step in the wrong direction in the sense that it introduces
further tools and dependencies that are not Windows-native.

My personal long-term goal is a Git that runs 100% native on Windows,
without any Shell or Perl scripts, compiled with Visual Studio against
the CRT and Windows API only, and without any emulation layer involved.
I have big hopes to be able to use libgit2 in order to make this happen
at some point in time.

With such a native Git, people could use cmd.exe, Powershell, Take
Command, bash or whatever shell they prefer to run it.

For now, it might be a better solution to look at Console2 [1] again,
but my last impression was that it's still buggy.

[1] http://sourceforge.net/projects/console/

--
Sebastian Schuberth

Reply all
Reply to author
Forward
0 new messages