PSReadLine replaces the command line editing experience of PowerShell PSReadLine and up. It provides:
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.
Automatic saving of history, including sharing history across live sessions.
"Menu" completion (somewhat like Intellisense, select completion with arrows) via Ctrl+Space.
The "out of box" experience is meant to be very familiar to PowerShell users with no need to learn any new keystrokes.
I really think this is a great new editing experience for anyone working with PowerShell scripts but as I mentioned to Joey during our talk “is there a way to share the PowerShell console history across multiple machines. Jason mentioned that you can pick up the history files and move it around.
I ran a little experiment and it’s working flawlessly. So far… LOL
Preparing Machine 1
Before we start. I use the latest version of PowerShell 7 on all my machines. Yes Windows PowerShell is installed but I did NOT try the following experiment with Windows Powershell. If you are planning on trying this on Windows PowerShell. You will need the 1.6.0 or a higher version of PowerShellGet to install the latest prerelease version of PSReadLine.
Windows PowerShell 5.1 ships an older version of PowerShellGet which doesn't support installing prerelease modules, so Windows PowerShell users need to install the latest PowerShellGet by running the following commands from an elevated Windows PowerShell session.
So, once I had PSReadLine installed on my PC I verified the location of my history file by using the Get-PSReadLineOption command.
I copied the “ConsoleHost_history.txt” file to a folder I created in my OneDrive folder. In my case “D:\1drv\OneDrive\PS-Hystory”. You can put it wherever you want. After copying the file all I needed to do is set the location by using the following command: