Seething over MSYS shell - is it replaceable?

2019-03-18 06:20发布

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.

8条回答
一夜七次
2楼-- · 2019-03-18 07:02

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.

查看更多
家丑人穷心不美
3楼-- · 2019-03-18 07:07

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.

查看更多
姐就是有狂的资本
4楼-- · 2019-03-18 07:08

From the msys shell:

mingw-get install mintty
mintty
查看更多
Fickle 薄情
5楼-- · 2019-03-18 07:08

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

查看更多
Summer. ? 凉城
6楼-- · 2019-03-18 07:10

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.

查看更多
▲ chillily
7楼-- · 2019-03-18 07:15

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)

查看更多
登录 后发表回答