views:

1897

answers:

9

CMD.EXE is posing lots of problems for me. I have Cygwin installed and use bash regularly, and I also have the mingwin bash shell that comes with mSysGit, but sometimes I really do need to run things from the Windows shell.

Is there a replacement for the Windows shell that:

  • has a persistent command-line history, available in my next session after I close a session? (as in bash HISTFILE)
  • remembers what directory I was just in so that I can toggle between two directories? (as in bash cd -)

(Or is there a way to enable these features in CMD.EXE?)

I see some has asked about a better windows shell before, but they were asking about cut and paste which is lower in priority for me at this point. It's not the console that's killing me, it's the command-line interpreter.

A: 

try console2: http://sourceforge.net/projects/console/

i like it

mkoryak
Is that usable by now? I took a look at it a while ago and it was buggy as hell ...
Joey
Doesn't address any of the problems I have. As I said, I'm not looking for a better console; I'm looking for a better shell.
skiphoppy
console2 is just UI front-end. Crap in crap out!, a la command prompt
Oliver
I like the tabs, but I still can't figure out how to select and copy text from it. If it actually has that feature they still fail for making it so hard to figure out.
Whatever
+18  A: 

Microsoft's just released Powershell. (about 2 years ago)

I've already downloaded it; didn't try it much, but seems a nice tool.

Seb
This appears to be as close as Powershell gets to persistent history: http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/add-history.mspx
skiphoppy
"just released"? it's been available for more than 2 years!!
Lucas
Maybe he meant PowerShell 2, CTP 3 was released in December. I'm looking forward to V2.
Bratch
I meant stable version 1.0! :)
Seb
+1  A: 

pushd and popd can be used to navigate to and from directories.

c:>pushd windows c:\Windows>popd c:\

David Owens
Been using that, but it won't work to toggle.
skiphoppy
+3  A: 

Then there's the PowerShell! Haven't tried it, but I've heard many nice things about it.

Deniz Dogan
+4  A: 

PowerShell, I would say. It is Microsoft's new official shell for command line administration.

I use it for development tasks myself, and like it. It gives you the flexibility to interact with the .NET framework classes directly on the command line, which can be very powerful.

driis
+6  A: 

I'm using Powershell too. It's a great, linux shell-like but object oriented, extensible framework. Cool not for just system administrators but for developers too (build process etc.). Powershell rocks bash or other linux competitors:)

Main adventages:

  • Extensible with .NET languages
  • Use of .NET objects (DateTime, File etc.)
  • Easy and clear syntax
  • Remoting
  • Debug
  • Steppable pipelines
  • ...

More from here:

http://blogs.msdn.com/powershell/default.aspx

http://windowsteamblog.com/blogs/windowsvista/archive/2006/11/14/it-forum-day-one-windows-vista-and-windows-powershell.aspx

http://blogs.msdn.com/powershell/archive/2007/11/06/what-s-new-in-ctp-of-powershell-2-0.aspx

boj
+1  A: 

PowerShell works quite well when you do your things in PowerShell way. For example when you want to mess around with .NET apps and Windows files. It works great for scripting as the syntax is a lot nicer than in Bash...

But when you want to work with some typical UNIX apps, then you can easily get into trouble when PowerShell converts all your LF line endings to CRLF (and don't even think about piping binary files).

Just my experience.

Rene Saarsoo
+2  A: 

I've always liked 4NT (haven't used it for a while now).

It's an enhanced command interpreter for windows, and it's mostly backwards compatible (meaning you can run normal windows batchfiles). The only reason not to use it is that it doesn't ship with Windows like the default command.exe does.

Compared to the default windows commandline interpreter, it has better flow control mechanisms. All standard windows commandline tools are available, but with extra options and parameters.

Basically it's what CMD.exe should've been.

Update: looks like it's not called 4NT anymore, but TakeCommand: http://jpsoft.com/products.htm

Wouter van Nifterick
A: 

I use cygwin. It's a posix implementation for Windows. So, you can run unix like programs on windows. The default terminal is bash, which is much more advanced than windows cmd.

Roberto Prado
I use Cygwin, too, as I noted in my original question. ;) But it doesn't fit all the needs for an enhanced cmd.exe, although it is certainly superior. It's just that it's sometimes inferior at being like Windows' original inferior shell.
skiphoppy