Help me make my windows cmd.exe console work more

2019-03-08 07:47发布

The windows terminal (the user-interface around text-applications like cmd.exe) really sucks.

There is so much that the Unix-style terminals do that the windows terminal apparently cannot do, for example what if you want to re-size the window in both dimensions by dragging the border. The Windows terminal only allows you to change it's length.

Cut & Paste, on Linux or Unix, no problem - the selection box wraps around nicely so you can cut multi-line expressions. The Windows terminal (even in Quick-Edit mode) forces a bizarre rectangular selection box which is of no practical use - you have to re-format everything you copy in notepad!

What about the fact that any time I go into 'edit' mode it blocks the application - I'm sure there are people who want to be able to cut & paste without stopping the business-critical server.

I'm sure we can think of more faults if we put our minds to it - but lets not grumble.. what can we do to make this better?

Update: Just to clarify, I'm not looking to replace cmd.exe - Powershell & CygWin both provide better alternatives. I'm trying to replace the console application, the GUI that surrounds all text-applications in Windows.

14条回答
对你真心纯属浪费
2楼-- · 2019-03-08 08:23

One of the first things I do to all my Windows machines is install Cygwin

There are some extensions for Cygwin too , like ssh and such.

查看更多
来,给爷笑一个
3楼-- · 2019-03-08 08:24

There are two things you can change independently—your terminal emulator and your shell.

Use a better terminal emulator

This will allow you to select text normally (instead of stupid rectangles). I favour Console2, which is fast, lightweight and reliable http://sourceforge.net/projects/console/

There's also ConEmu https://code.google.com/p/conemu-maximus5/.

There's also Mintty https://code.google.com/p/mintty/ (same terminal emulator that Putty uses). Mintty can't run interactive apps like nano or vi. Mintty can't run cmd either, only Bash.

Whatever you choose, it's useful to add 'open console here' items to Windows Explorer context menu. Instructions at https://stackoverflow.com/a/17663556/284795

Use a better shell

Clink

Clink improves cmd, adding session history, and Bash-style autocomplete. https://code.google.com/p/clink/

Bash

The most reliable distribution of Bash for Windows is with MSysGit. It's very easy to install, and you get a free Git https://code.google.com/p/msysgit/

It's worthwhile at this point to explain the difference between MSys and Cygwin. MSys is a collection of apps painstakingly ported to the native win32 API, whereas Cygwin is an emulation layer that can run arbitrary Linux apps.

In my experience MSys is more comfortable, it interoperates better with Windows (in particular how it handles paths). Though Cygwin has more apps, and more recent.

查看更多
登录 后发表回答