Emacs > CMD.EXE

Mozilla requires a unixy dev environment. Makefiles, hg, patches, ssh, irc, etc. Unfortunately Windows lacks in terminal abilities. No tabs, crappy cut/paste, limited size, slow, etc.

Emacs has a wonderful shell-mode(ie my bottom-left buffer). This means that windows can now do proper command history, cut/paste & use multiple emacs buffers(like tabs in a more sane terminal). Like all good features in emacs, out of the box shell mode is pretty busted, but can be fixed to default to bash. Microsoft also provides a very nice fixed width font for emacs. I keep my emacs config in hg. I really appreciate the operating system that is emacs.

6 comments

  1. If you have not checked it out, look into Windows PowerShell. It’s like cmd.exe on steroids, and much more like a bash shell (for example, ls and pwd work. Similar copy+paste. Even down to ~ being home). Quite frankly, I don’t know why they bother keeping cmd.exe it is so terrible

  2. Vasilis Vasaitis

    Alternatively you can use eshell, the emacs shell, which is written in elisp and does not rely on an underlying UNIX-like shell.

  3. Yep, powershell will make you forget about cmd.exe. (its kept for compatibility)

    Note that you can also just have bash.exe inside if you like.

  4. Sadly, on Windows redirecting the tty can be hard – especially in the case of password prompts. Essentially, things can check istty() a bit too hard :)

    I recently wanted to redirect I/O for things like hg, git, svn… Git was easy ($GIT_ASKPASS); svn was impossible. It uses APR, which eventually just ends up using functions that go below the stdout (fd!) layer and get the real console which didn’t exist in my case…

    So most of the time it’ll work fine, and then some of the time you won’t know what broke ;)

    Console2 doesn’t have the problem because it basically screen-scrapes, hence the slow :(

  5. I use rxvt on Windows. Seems to do the job ok. (I use the MozillaBuild link to cmd.exe, then type rxvt & and iconify the useless cmd.exe window.)

  6. I recently wanted to redirect I/O for things like hg, git, svn… Git was easy ($GIT_ASKPASS); svn was impossible. It uses APR, which eventually just ends up using functions that go below the stdout (fd!) layer and get the real console which didn’t exist in my case…