powershell auto-completion

I am used to using intelligent prompts zsh-autosuggestions in zsh, but the terminal in windows does not have intelligent prompts by default, which is very uncomfortable. So is there any alternative?

Install powershell-7.3

My windows 10 is installed with powershell-5.1.19 by default, so let's upgrade first.
Official installation documentation:

https://learn.microsoft.com/zh-cn/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3#installing-the-msi-package

My actual download address is:
https://github.com/PowerShell/PowerShell/releases/download/v7.3.6/PowerShell-7.3.6-win-x64.msi

Download it, just click next all the way.
After the installation is successful, there will be one more item in the windows terminal.
insert image description here
I set it as default.
insert image description here
View version information:

$PSVersionTable

insert image description here

Turn on autocompletion

Just execute the following command.

Set-PSReadLineOption -PredictionSource History

insert image description here
It's much more convenient now.

reference

https://blog.csdn.net/gjmjack/article/details/117856168

Guess you like

Origin blog.csdn.net/lxyoucan/article/details/132082737