Question

I need a serviceable shell for MSYS. This is my current dilemma:

The default rxvt.exe has a scroll bar and copy and paste, but doesn't send control characters or arrow keys to a running program in the shell (like interpreters/debuggers). This is a real thorn when using the Haskell interpreter ghci.

The other shell sh.exe handles control characters (or at least some of them), but has no scroll bar or copy and paste.

rxvt also has (relatively) more issues with output buffering

What are my options? Does the replacement shell need to be msys aware? All I want is a sane environment to work with Haskell (ghc), C++ (gcc), and the basic tool chain (make and what not). I'm willing to compile a shell if it doesn't involve crazy shenanigans.

Was it helpful?

Solution

If you're after a better terminal emulator, I've had success with http://sourceforge.net/projects/console/

It's a replacement for the standard windows command window. You can set MSYS or Cygwin, or whatever you want as the shell backing it.

OTHER TIPS

Check http://code.google.com/p/mintty/. How about that? I find it absolutely useful. Or puttycyg (an older attempt)?

From the msys shell:

mingw-get install mintty
mintty

You are confusing "shell" and "terminal emulator". sh.exe is the former; rxvt is the latter. (mind you, under Windows you can do without a terminal emulator because Windows creates one (a "console window") for any console program (such as sh.exe) if it's not already running inside one)

Use PowerShell instead of the old cmd. Then run sh like this

C:\msys64\usr\bin\sh.exe --login -i

I tested on Winows 8.1 with MSYS2 and Haskell Platform 2014.2.0.0. With GHCi there are no problems. All arrow keys and other keys work as expected.

Also, I could not get the Console2 to work on Windows8 properly as suggested in the other answers.

This question has gone a bit stale; mintty is now included by default in MSYS2. Ironically enough, I was unable to access the command history in GHCi -- pressing up would move the cursor, and place \ESC codes in the input buffer -- and this was fixed for me by removing mintty (pacman -R mintty from the MSYS2 shell).

I've not used the msys stuff, but it should be enough to use something other than rxvt and run sh.exe in it. Now, if you're using control characters, you may need to be sure whatever you use supports what you need (i.e. vt100 emulation).

One route might be to use cygwin. I typically run cygwin with a rootless X server, and run xterm on it.. So far it has been very good and I haven't had many issues. I know arrow keys and such work just fine under it.

Do yourself a favour and use proper Cygwin instead of the unmaintained fork of an old Cygwin version that is msys.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top