Home | Articles | Images | Links | Contact Me | Login Archive | RSS Feed | ATOM Feed

Calendar

AprMay 2008Jun
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Suggested Reading

Blog Stats

Posts - 1305
Stories - 6
Comments - 2155
Trackbacks - 461

Flair

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.
PowerShell++ (aka PowerShell is better with friends)

Yes, my love affair with Windows PowerShell continues. I've rediscovered a couple of things that make the PowerShell experience even better.

The most recent one for me is PowerTab. PowerTab takes the extensible Tab-completion feature of PowerShell to rediculous extremes. Imagine Intelli-crack for everything... functions, cmdlets, paths, .NET types and methods, parameters, etc. Truly amazing work. (Here's a video to whet your appetite: PowerTab 0.93 and BDD 2007 teaser)

Another one isn't really about PowerShell per se, as much as it is about redisovering some gems from my past. I've always been a VIM guy (as opposed to an Emacs guy). In fact, I'm the maintainer of the VIM syntax files for PowerShell. But there are lots of other gems in the Unix world that make PowerShell even better.

There are a number of projects on CodePlex and others that are attempting to recreate all the old Unix utils as PowerShell cmdlets, and in some cases they make sense. For example, when you use the unix 'tail' command, it returns you a big ol' string. For PowerShell you would probably prefer to have it return an array of strings to save you a step in your  command pipeline.

But there are things that aren't really about returning objects to you. Things that are more about manipulating files and such. For example, suppose you want to do a global search and replace in a file. Sure you can do this with a few lines of PowerShell script. You could even create a custom function of cmdlet to generalize it for you.

Or you could just use 'sed', the old Unix stream editor. It is simple, amazingly powerful, and works every time. There are a surprising number of useful gems (like 'less' for example) from the Unix world that have been ported over to Win32 and they all work wonderfully with PowerShell. There are two projects on Source Forge that I keep an eye on for these kinds of things:

The final tidbit is the #PowerShell IRC channel on FreeNode.net. Yes... I use IRC. IRC is still the best open and freely available distributed chat system out there. Again, like so many of the old Unix things, it is simple, powerful and works every time. There are lots of very intertesting channels on FreeNode, most of which are about technology and not the newest bad reality TV show. If you're interested in giving IRC a try, check out the Silverex X-Chat client and look for me on Freenode as PProvost.

So all you PowerShell junkies... don't forget your roots. There are still gems to be mined from the olden days.

Technorati Tags: , , ,

posted on Thursday, October 18, 2007 9:10 AM

Search

Supported By


Current Promotion
ThinkGeek

Hosted By