« Windows Mobile 7 | Home | My Next Laptop »

Individual Entry With Comments


January 8, 2008

Windows PowerShell 2.0

Filed under Computers, Programming, Software

Graphical PowerShell Script Output

Linux/Unix (and Mac since OS X) have always had much better shells than Windows. But that is about to change.

Windows PowerShell 2.0 looks very impressive. It should make the Linux/Mac/Unix world scramble to come up with something that matches the features of PowerShell 2.0.

The feature I'm most excited about is called the "Graphical PowerShell." It is pictured above and replaces the pathetic "Command Prompt"...

image

You can see from the top picture that the Graphical PowerShell is broken into three parts.

  1. The top part is used to store scripts. It has syntax highlighting and debugging (set breakpoints).
  2. The middle section is output from the above scripts or from the interactive console.
  3. The bottom section is what most shells look like. This is where you can interactively type in commands.

One of the things that drove me *nuts* about Windows' Command Prompt was that you could not select a multi-line command. Selection worked in screen space, which is terrible!

For example, below I wrote a command that I want to copy. Because selection is in screen space, the best I can select is 'more *.cpp | find' instead of the whole command 'more *.cpp | find "include"'.

image

Graphical PowerShell doesn't have this problem. You can select by line now (finally!)...

image

You can also resize the window which doesn't work very well with Command Prompt.

The PowerShell command language itself is well thought out and very consistent. All commands are made up of verb-noun pairs like Set-Location, Copy-Item, Write-Output, etc. (with aliases that work as shortcuts). It looks to be very competitive with all the other shells out there in terms of shell features.

Passing data between commands in Unix/Mac/Linux involves sending text from one to command to another (like "more junk.txt | grep lenihan"). PowerShell passes *objects* between commands.

This article shows a quick example of the power of passing objects instead of just text. A list of directories is passed to a move command. If this were done with text, the text would need to be formatted in such a way that the move command would recognized the text as file names (like removing the date information). PowerShell already knows what type an object is so you can skip any of this formatting! Very nice!

PowerShell 1.0 is out now. It still uses the old Command Prompt for input/output. The Graphical PowerShell (replacement for Command Prompt) is part of PowerShell 2.0, which is available in alpha right now.

I can't wait for PowerShell to replace the Command Prompt in Windows!

Comments (1)

Bubba:

The next version of Windows (currently called Windows 7) will have PowerShell 2.

http://news.softpedia.com/images/news2/Feast-Your-Eyes-on-the-Leaked-Screenshots-of-Windows-7-M1-Ultimate-Edition-6.jpg

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


About

This page contains a single entry from the blog posted on January 8, 2008 11:15 PM.

The previous post in this blog was Windows Mobile 7.

The next post in this blog is My Next Laptop.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34