DevOps tool: PSReadLine and how to install it using PowerShell v5.0 and OneGet

What is PSReadLine

It's someone at work that told me about PSReadLine. I just took me 5 minutes to realize that this module is a life changer for everyone doing serious PowerShell. Here is what is does

This module replaces the command line editing experience in PowerShell.exe for versions 3 and up. It provides:

  • Syntax coloring
  • Simple syntax error notification
  • A good multi-line experience (both editing and history)
  • Customizable key bindings
  • Cmd and emacs modes (neither are fully implemented yet, but both are usable)
  • Many configuration options
  • Bash style completion (optional in Cmd mode, default in Emacs mode)
  • Bash/zsh style interactive history search (CTRL-R)
  • Emacs yank/kill ring
  • PowerShell token based "word" movement and kill
  • Undo/redo
  • Automatic saving of history, including sharing history across live sessions
  • "Menu" completion (somewhat like Intellisense, select completion with arrows) via Ctrl+Space

More information about PSReadLine.

How to install it

First you'll need PowerShell 5. You can get it from Microsoft website's download section. Download PowerShell 5

In a PowerShell console, type the following:
Install-Package PSReadLine

Now that the module is installed. Open or create the file named:
C:\Users\{username}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

and insert the following statement:
Import-Module PSReadLine

The PSReadLine module will now be imported everytime the PowerShell console is invoked.

Tryout this PowerShell module and let me know what you think...