31

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.

Craig McQueen
  • 41,871
  • 30
  • 130
  • 181
Salim Fadhley
  • 22,020
  • 23
  • 75
  • 102
  • I would say that rectangular selection can be rather useful. If you are looking at a log, often times the critical information are all aligned; rectangular selection really helps there. – nevets1219 Mar 05 '10 at 00:51
  • "... without stopping the business critical-server." well, I'd argue that a *business critical* server application does not run forground in a console window, as it would "go away" when you log out. Secondly, I always found that "feature" handy to "pause" an application when I want to read messages flying by. – Christian.K Aug 27 '12 at 04:30

14 Answers14

42

I personally use Console2 with the Bash shipped with MYSYS-Git.

You can also use PuTTY and SSH to a real linux box ;-)

Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
Lucas Jones
  • 19,767
  • 8
  • 75
  • 88
  • @orip - same as me! I used to use it with PowerShell, but PowerShell isn't shell-y enough for me. – Lucas Jones Jan 23 '09 at 19:22
  • 2
    Console2 has several show-stopping bugs and quirks. Are you really using it full time? – bzlm Mar 12 '09 at 19:09
  • @bzlm: It does crash a wee bit, but I think it's worth it for the extra features. I really like that you can resize the window! – Lucas Jones Mar 16 '09 at 16:55
  • Also, here's a tip - my favourite PS1 is: PS1="[ \u@\h ] \`basename \$PWD\` $ " Which produces output like this: [ personb@winxpvm ] SharpDevelop Projects $ – Lucas Jones Apr 07 '09 at 13:55
  • I use Console2, it's very handy. The only problem is unlike unix shell when you are typing [enter] while you are in the stout of a running application, the screen does not response and leave empty lines. Sometimes I fond this feature very convenient when you are debugging a web app. – Gelin Luo Jun 09 '11 at 06:14
  • 1
    @Lucas You can resize the existing shell as well, just set the underlying buffer large enough. Try 9999,300, sometimes I go as high as 550 for the width. – Bill K Nov 30 '12 at 21:50
  • @bzlm I use Console2 daily with both Cmd and Bash (MSys) without any problem. – Colonel Panic Jul 16 '13 at 15:52
  • @ColonelPanic Sounds like I should give it a try again then. After all, it's been 4 years. :) – bzlm Aug 05 '13 at 12:18
9

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.

Noldorin
  • 144,213
  • 56
  • 264
  • 302
7

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.

falstro
  • 34,597
  • 9
  • 72
  • 86
  • 3
    You might want to give mintty a try (available as a package within Cygwin setup). I've found it to be much nicer and usable than crufty old xterm. And it isn't an X application so doesn't require an X server if you don't want or need one. – Dan Moulding Jul 29 '10 at 19:45
5

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.

Community
  • 1
  • 1
Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
  • BTW, ConEmu may intercept "creation" of console window. For example, you press Win+R, choose any console app, Enter - and it starts in ConEmu window. – Maximus Jul 18 '13 at 14:31
  • I think you get a Bash shell when you install standard git anyway. That's what I seem to have. – Archimaredes Dec 29 '13 at 23:39
  • I use Clink for a couple of weeks. I've added this line, `call C:\bootstrap.bat`, to the `clink.bat` file in order to make it easily extensible. `bootstrap.bat` then contains aliases (doskey) and calls to various scripts I've written. This may not be the right way to extend Clink but this is at least an easy one :-) –  Feb 22 '15 at 07:33
4

I found iPython in its -s mode to be as close as I can get. It also doubles as a python interactive shell.

3

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.

William T Wild
  • 1,025
  • 1
  • 14
  • 23
1

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

Bill K
  • 62,186
  • 18
  • 105
  • 157
0

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.

0

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.

Steve
  • 1
0

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.

Aakash
  • 21,375
  • 7
  • 100
  • 81
0

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?

Tamas Czinege
  • 118,853
  • 40
  • 150
  • 176
  • 5
    No. PowerShell is a *shell*. It does nothing to address the failings of cmd.exe as a *terminal*. – nobody Jan 23 '09 at 17:58
  • If you are talking about visual appearance, you are right. But in terms of functionality, powershell is an improvement over cmd.exe – Tundey Jan 23 '09 at 18:02
  • 5
    @Andrew: cmd.exe is *not a terminal*. It's a shell. It is displayed in the standard Windows console window. The person who asked the question mixes the two things apparently. Powershell has its own console window which is way much better than the standard Windows console window. – Tamas Czinege Jan 23 '09 at 18:03
  • 1
    Yes, my mistake. CSRSS provides console widows on Windows and is the source of window-resizing limitations, etc. PowerShell does not address this. – nobody Jan 23 '09 at 22:00
  • 4
    CSRSS, or the terminal window, or the thingy with a title bar that you can drag around (and in the case of the Windows terminal, you can't do much else with), whatever you call it, sucks and as far as I can tell PowerShell indeed does nothing to fix this. – Matthew Flaschen Mar 01 '09 at 07:54
0

I have not tried KDE on WIndows, but it is allegedly now available in the latest release at writing.

casualcoder
  • 4,770
  • 6
  • 29
  • 35
0

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.

Rook
  • 60,248
  • 49
  • 165
  • 242
  • 1
    Apparently the original poster knew about these things, because he commented about how lame they were. – Cheeso Aug 03 '09 at 12:22
  • 1
    @Cheeso no, the OP specifically mentioned not being able to change width, which Idigas's method allows. – Bill K Nov 30 '12 at 20:32
-2

I think your looking for Powershell which I can argue is stronger then the linux bash or atleast has the same amount of power.

masfenix
  • 7,736
  • 11
  • 45
  • 60