Seething over MSYS shell - is it replaceable?
Asked Answered
E

8

15

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.

Extrorse answered 21/10, 2008 at 4:5 Comment(2)
I use cygwin's copy of rxvt, and I haven't noticed these issues. At least not with the more normal shell=control keys such as <Ctrl-C> <Ctrl-X> <Ctrl-z> etc. Are you using other stuff than that? Can you try to use MinGW with cygwin?Taynatayra
I should correct that rxvt does send something, it just doesn't play nice with GHCi. e.g. arrows keys insert hidden '\ESC' characters (ruining whatever input you had) instead of their usual function. Ctrl-C also has problems, and there is even a wrapper program ghcii.sh just to handle that issue.Extrorse
A
14

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.

Abscind answered 21/10, 2008 at 4:34 Comment(1)
For those who, like me, are struggling with getting sh.exe to work inside Console: set 'C:/MinGW/MSYS/1.0/bin/sh.exe --login -i' as your shell in the Console settings.Clutter
X
8

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

Xuanxunit answered 11/9, 2009 at 10:49 Comment(0)
B
8

From the msys shell:

mingw-get install mintty
mintty
Brigand answered 3/2, 2012 at 5:56 Comment(1)
mintty looks great. Just installed it and it looks just like the cygwin shell.Boardinghouse
L
3

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)

Lightheaded answered 21/10, 2008 at 4:24 Comment(0)
S
1

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.

Smug answered 10/10, 2014 at 16:26 Comment(0)
N
1

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).

Nullification answered 10/6, 2015 at 15:23 Comment(0)
B
0

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.

Bordelon answered 21/10, 2008 at 19:13 Comment(0)
F
-5

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

Fabi answered 22/10, 2009 at 19:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.