For various reasons, I find myself spending more and more time in win32 these days. Blech.
Luckily lots of useful programs have been ported to Windows lately so I am not entirely without tools. However, there is one glaring problem which I can't seem to work around.
Rumour has it that the command-line interface to Windows isn't a program at all, but some kind of awful kernel service. cmd.exe is also some kind of horrid abomination. Here are some things that are wrong with it:
- Command Window
- It doesn't draw the same style of window borders as every other window.
- You can't resize it horizontally, interactively.
- You can't maximize it horizontally
- On a system with multiple desktops, you can only maximize it on one desktop
- There is no keyboard shortcut for pasting text.
- "QuickEdit mode" isn't the default, so the window is unresponsive to the mouse
- and even when it is turned on, it behaves extremely bizarrely, unlike xterm or any other Windows program
- The scrollback is unbelievably pathetic - only 999 lines?
- You can't select monospaced fonts such as ProFont, only Lucida Console and the default VGA font
- Regular window keyboard shortcuts don't work: you can't close it with Alt-F4.
- It ... conflicts ... with some video card drivers. I had to update my nvidia drivers just so I could drag command windows around!! How is that even possible!??
- CMD.EXE
- no tab-completion of commands
- no tab-completion of commands
- you can't tab-complete commands
- history behaves weirdly: you seem to maintain a global position in it, except... you don't
- going back to your home directory is harder than starting a new terminal, seriously:
X:\>%HOMEDRIVE%
X:\>cd %HOMEPATH% - there is no shortcut like ~ to refer to your home path in other commands, either
- there is no shell-startup file
- .bat language is almost perversely crippled
- the shell doesn't do expansion, so tricks like 'echo *' don't work.
- the whole idea of %PATHEXT% is weird; how do I make this compatible with scripts for any other platform?
- did I mention that tab-completion is broken?
Now, I realize that you can use cygwin's bash.exe to correct some of the deficiencies of the shell, but it has its own issues. Is there anything that can replace the command window, so that I can use cywin's bash, Python, and other command-line tools without cringing constantly? In particular the horizontal resize and maximize issues are the worst. I have already tried xterm under cygwin as well as local SSH with PuTTY - both of these don't work very well with actual Windows command-line programs (such as Python) so I'd like something designed specifically for Windows.
10 comments:
By 'xterm', do you mean 'rxvt'?
... is that PuTTY's terminal has been ported to *Linux* as a generic terminal (pterm), yet hasn't been ported to *Windows*.
The unxutils kit comes with a native zsh(at least that's IIRC, it's named sh.exe), which corrects the easy problems.
It still lacks a decent terminal emulator though.
Tab completion works fine at home and work for the most part (not as fancy as csh and decendants, but...). It is, of course, turned off by default, and I think the only way to turn it ON is to use something like TweakUI (search Microsoft's download pages, it's up there). TweakUI has a few other things in it that may make your life easier, as well, but the shell features are probably what interest you most.
Over on mingw.org might be worth a look.
http://jpsoft.com/ have had great CMD replacements since
the DOS days, when CMD was command.com, and the replacement
was 4DOS.
The NT version is 4NT, if you want to use the command
shell-type windows (which you don't). They also
have TakeCommand, an MDI application that behaves
properly in most the repects you mention, although
you might have to use a built-in function for the globs.
I haven't used their product for a few years, having gone
the cygwin route. But I think you'll like them, even
if they are shareware.
Only one apology from me. "There's no keyboard shortcut for paste." yeah, there is, technically: Alt-Space opens the control menu, from which you can hit e, p to open the Edit submenu and Paste. So, Alt-Space,E,P. Sucks! I know. But you can actually learn to type that pretty fast.
There is no suitable replacement for it. I've tried the Putty version and the rxvt version, and they're essentially the same thing, with essentially the same problem: the pseudo-readline they put into Windows Python is horribly, grotesquely broken. You have to invoke python -i to even get an interactive prompt, but it's useless if you ever make typos when you type. I've even tried the windows readline-y libraries that are out there, and they don't fix the problem.
Well, there's this, if you dig cygwin. It's useless, though, for reasons I explain in my own comment.
I just tried both 4NT and TakeCommand. My comments:
TakeCommand: sorta terminal emulator-ish. Promising start, falls over immediately when I discover that: 1) when you run cygwin, it launches the native kernel service cmd window. 2) when you run python, it launches the native kernel service cmd window. (God forbid you should try to run command-line programs in the command line.)
4NT: Uses the native kernel service cmd window. Thus cygwin and python work fine, but it solves none of the problems.
You could try Monad, the official new Windows shell (It works on XP). Instead of natively working with text, it works with objects (CLR/.NET objects). It supports "tab completion" in the form of Visual Studio-like autocompletion, which is easier for me to use.
http://blogs.msdn.com/karstenj/archive/2004/06/25/166334.aspx
Post a Comment