Resurrecting a thread that didn't even exist on this list :)  There's a final 
version of this now. After installing, to get the tab completion I'm after, 
make sure to run:

Set-PSReadlineOption -EditMode Emacs

https://github.com/lzybkr/PSReadLine


-----Original Message-----
From: Crawford, Scott [mailto:[email protected]] 
Sent: Wednesday, October 10, 2012 12:38 PM
To: NT System Admin Issues
Subject: RE: Powershell Tab Completion

Ahh, finally :)

http://nivot.org/nivot2/post/2012/09/12/Emulating-Bash-GNU-Readline-with-PowerShell-30.aspx

-----Original Message-----
From: Crawford, Scott [mailto:[email protected]]
Sent: Tuesday, August 14, 2012 7:02 PM
To: NT System Admin Issues
Subject: Powershell Tab Completion

I'm looking for a way to improve Poweshell's tab completion to be more like 
Linux. My *nix experience is limited to VMWare 3.x and Extreme XOS, but I 
believe the behavior I'm about to describe may be more accurately described as 
Bash's. In any case, I'm going to refer to it as Linux for the purposes of this 
post :)

Assume I've got the list of cmdlets below and want to run 
Get-MailboxImportRequestStatistics. In PS, I can type Get-Mail and start 
pressing tab, but I have to hit tab 13 times, looking for the appropriate 
command.  But in Linux, I only need to type Get-Mail and when I press tab, it 
automatically completes up to Get-Mailbox, which is the point of ambiguity. 
Then I can tack on an I, press tab and it completes to the next point of 
ambiguity, namely Get-MailboxImportRequest. I tack on an S, press tab, and I'm 
done.  All told, under Powershell, I need 21 keystrokes to complete the 
command. In Linux, I only need 13.

I've seen a few different Powershell scripting environments, but I haven't been 
able to find one that handles tab completion the way Linux does. I've also seen 
info around modifying the TabExpansion function, but I've not seen a mod that 
implements what I'm looking for.

Am I missing something out there or is what I'm wanting impossible?

Get-MailboxAuditBypassAssociation
Get-MailboxAutoReplyConfiguration
Get-MailboxCalendarConfiguration
Get-MailboxCalendarFolder
Get-MailboxDatabase
Get-MailboxDatabaseCopyStatus
Get-MailboxExportRequest
Get-MailboxExportRequestStatistics
Get-MailboxFolder
Get-MailboxFolderPermission
Get-MailboxFolderStatistics
Get-MailboxImportRequest
Get-MailboxImportRequestStatistics
Get-MailboxJunkEmailConfiguration
Get-MailboxMessageConfiguration
Get-MailboxPermission
Get-MailboxRegionalConfiguration
Get-MailboxRestoreRequest
Get-MailboxRestoreRequestStatistics
Get-MailboxSearch
Get-MailboxServer
Get-MailboxSpellingConfiguration
Get-MailboxStatistics

~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ 
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ 
<http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin



Reply via email to