![](/style/images/good.png)
![](/style/images/bad.png)
Adding Predictive IntelliSense to my Windows Terminal PowerShell Prompt with PSR...
source link: https://www.hanselman.com/blog/adding-predictive-intellisense-to-my-windows-terminal-powershell-prompt-with-psreadline
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I've long said You should be customizing your PowerShell Prompt with PSReadLine. Go to your PowerShell prompt, and
Install-Module PSReadLine -AllowPrerelease -Force
Then, after running code $profile or nodepad $profile, add
Import-Module PSReadLine
Sure, but next, add these:
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
This means that PSReadLine (and hence, your prompt in general) will use your prompt history to make predictions on what you want to see next. These predictions can be on one line in light gray (full details on Jason's blog) but I like them to pop down in a ANSI style ListView. Then you can edit them with up and down arrows (or Emacs or VI soon).
![psreadlinehistory.gif](https://hanselmanblogcontent.azureedge.net/psreadlinehistory.gif)
I'm loving PSReadLine an will be doing a video on setting up your best prompt soon.
Sponsor: Pluralsight helps teams build better tech skills through expert-led, hands-on practice and clear development paths. For a limited time, get 50% off your first month and
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK