Surely someone has written a decent shell for Windows.
I'm looking for
a) something more or less like the ordinary linux shell (ie. history, completion etc.)
b) something which is a simple install (easier than Cygwin which didn't seem all that good when I tried it.)
Bonus points if it's :
c) Free (as in speech)
d) Allows forward slashes instead of back-slashes in paths
Powershell has a SIGNIFCANT advantage over any of the other command shells. It is OBJECT ORIENTED.
In cmd, bash, etc. your output from a command like dir/ls is a effectively a string array. If you pipe tha tto another command then you have to process strings. In Powershell the dir cmdlet actually gives an array of file objects that you can pipe to another command and act on those objects via properties. Powershell is really an interactive .Net shell. Every cmdlet is actually a wrapper around a set of .Net objects.
All the next generation of management interfaces coming from Microsoft are actually implemented in Powershell and the GUI interfaces are a wrapper around the Powershell commands, similar to the "Unix way" of doing GUI admin tools.
Here's an example from an Active Directory perspective... You can use the cmd.exe shell and a utility like dsquery.exe to do LDAP queries for objects. But you get a list a distinguished names back. You can then process those DNs as string, etc. In Powershell v1 or v2, you can install and use a Quest snap-in that gives you tools like get-QADUser. When you query the AD with get-QADuser the return values are a collection of User objects. So a command like:
Will return a a collection that you can process by property, for example to sort them by HomeDirectory you would use:
There is no other shell out there that has this capability for Windows. Powershell is the way to go, absolutely.
Update: PowerShell v2 is now released as part of Windows Management Framework, but if you want to get the Microsoft AD cmdlets, you have to be running server 2008 R2 or Windows 7, else it's still the Quest cmdlets.
Poweshell. Nuf said. :)
I'm pretty sure cmd allows forward slashes.
Have you looked at Powershell? People seem to swear by that.
Windows Powershell is great, easy to install and is going to come with Windows 7. You even can write cmdlets which are very similar to bash scripts.
I've been an Ubuntu user for about 3 years now and I loved it.
I'll have to join the powershell chorus. Unlike a unix style shell, cmdlets all use a pipeline of objects that flow from one cmdlet to another. This means that you don't have to worry about figuring out how to make one cmdlet work with another. In the unix world most shell command and scripts spend gobs of code stripping out the "extra text" that the next command can't deal with. It also means that the more you learn about it the more you can use it. Unlike a typical shell where you have to learn how each command works so you can figure out how to transform the piped text, powershell cmdlets work the same regardless of input. Eg if I send a directory list to select-object (which chooses specific properties to use) select-object works the exact same way if I send it an active directory user object, an SCOM management class or an exchange mailbox.
Take a look at And Now for Something Completely Different:Introducing Windows PowerShell
Why did you abandon Cygwin? What sort of problems did you experience with Cygwin? While I have only dabbled with powershell, I have used cygwin for several years and find that it's POSIX utilities are a must on wintel machines, not to mention all the services like SSH client and server, and X-windows. All for free.
Mike's right, there is always Hamilton C shell. (I wrote it! :) And I can happily report that I released a major revision just literally days after Mike's observation that it didn't appear to have updated recently. This latest build now fully supports Vista and Win7 and you get both 32 and 64-bit binaries.
To answer your specific questions:
Yes, it includes all the usual suspects, history, command line editing, filename and command completion, aliases, background processes, etc., plus many enhancements such as built-in and user-defined procedures, block-structured variables, expressions with floating point and improved wildcarding (e.g., a "..." construct to mean zero or more directory levels, as required to make the pattern match.) It also includes a fairly complete set of all the usual built-in and external utilities such as more, ls, grep, sed, head, tail, diff, xargs, sort, chown, tar, etc. (The only things of importance I don't include are awk, perl and vi, for which authoritative, free versions for Windows already exist.)
It's very simple to install. Just open the standard XP and Vista-compatible Windows Installer .msi file and you're good to go. The entire user guide is installed as hypertext. It's completely well-behaved, so uninstalling through the control panel also works exactly as it should, removing everything. (You won't find any junk left behind in the registry or elsewhere.)
Sorry, it's not free. Price is $350 here in the US but I do give discounts for students and in certain other situations. (I really don't want cost to be problem, so if it's going to be, please reach out to talk to me. I'm a regular person like you not some huge corporation.)
Yes, you can use either forward or backward slashes. And you can set the escape character to be either a Windows-style circumflex(^) or a UNIX-style backslash().
I am the sole author. It's all my own work, all of it written completely from scratch for Windows. I go straight to the Win32 API for everything (I don't even bother with the C runtime except to sprintf stuff because the CRTL hides things like error codes) so it's both very fast and it really understands Windows. Internally it's implemented as a true, multithreaded top-down recursive descent compiler architecture, so even though it's a C shell, you can rest assured it does not have any of the problems often complained about in the original UNIX C shell.
If you'd like to take a closer look, I do have free demo versions on my website so you can certainly try it before you buy. And it comes with an unconditional satisfaction guarantee, so if buy and change your mind, you can return it for any reason or even for no reason at all and get your money back.
If you have questions at all or I can help in any way, just send me mail at [email protected] or give me a call at 425-497-0102. As I said, I am real person and I do answer the phone. I hope this was helpful.
http://win-bash.sourceforge.net/ <- if you are already used to bash style.
There's always the Hamilton C Shell, but it looks like it hasn't been actively updated in the last year or so.
Have you actually looked at cmd.exe recently? Since at least as far back as Windows XP it supports all of your requirements aside from / instead of \ (so no bonus points but otherwise it's fine).