More PSReadLine Power
Last time, I showed you how to customize PSReadLine in your module by taking advantage of examples in the sample PSReadLine profile script. But since this module has so many options, I thought I'd come back to it one more time and share some other tips and tricks. Let's start with looking at key bindings again.
The PSReadline module is an integral part of PowerShell. It gets loaded automatically when you start PowerShell and pre-defines many keyboard shortcuts. Which is great, because the more you can keep your hands on the keyboard, the more efficient you can be. One keyboard shortcut which I wasn't taking advantage of until Sean Wheeler, the lead docs writer for PowerShell, opened my eyes is Alt+a
.
Suppose you have a command like this entered at your prompt:
Get-Process p* | sort WS -Descending | Select -first 10