可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.
回答1:
I personally use Console2 with the Bash shipped with MYSYS-Git.
You can also use PuTTY and SSH to a real linux box ;-)
回答2:
Use Console 2, perhaps? It's really quite stable now, and allows you to switch between cmd/PowerShell/cygwin/any other shell very easily. If we're honest about it, it's not likely Microsoft are going to improve the native Win32 console any time soon.
回答3:
The only 'solution' that I have found to this problem is to install Cygwin/X and use XTerm instead. I use that every day at work.
回答4:
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.
回答5:
I found iPython in its -s mode to be as close as I can get.
It also doubles as a python interactive shell.
回答6:
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.
回答7:
Not a direct answer, but since you will occasionally HAVE to work in a windows CMD window there are 2 settings that are absolutely necessary to make it tollerable.
One of the very first things I do when I get on a new computer is set the screen buffer size to 9999(height), 300(or sow width). This allows you to scroll left and right to your hearts delight, and gives you a significant buffer for examining logs. Don't set the window size, it's virtually useless.
the other thing I do is check the "QuickEdit" mode, this makes copy/past much easier, and you can quickly pause a scrolling screen by clicking/dragging in it(to begin a selection).
This isn't exactly a solution to the problem, just related advise that might be useful to solve the specific problem he mentioned in a different way (And a very useful habit!).
回答8:
Instead of trying to force the Unix behaviour on Windows - which would be a bit unnatural - why don't you check out PowerShell, Microsoft's next generation shell for Windows?
回答9:
I have not tried KDE on WIndows, but it is allegedly now available in the latest release at writing.
回答10:
To change the size of the cmd prompt, you can either change the window size from the properties box, which will only resize the window itself, or/and you can change the buffer size, which will resize the ... how to describe it, the number of remembered lines.
To access the properties toolbox, right click on the title bar and properties.
Also, if you want to quickly copy stuff from the cmd prompt, enable the "quick edit" box in the properties window - it will enable you to select stuff, and "copy" it with a right click.
回答11:
There is a native windows version of rxvt that is available in Cygwin. It seems to work quite well and can be resized with ease, e.g. full screen.
回答12:
I use JTerm desktop console on Windows. It has Java implementations of all major Linux / Unix commands, such us ls, grep, find, cd, cp, mv etc.
It has some limitations, but overall it works will.
回答13:
IF YOU WANT A CYGWIN ALTERNATIVE
npm install -g cash-global
There is a well written blog about The Cash Shell
.
You can also check out the npm
package here.
Hope this helps.
回答14:
I think your looking for Powershell which I can argue is stronger then the linux bash or atleast has the same amount of power.