powershell 自动补全

我在zsh中使用智能提示 zsh-autosuggestions已经习惯了,而在windows中的终端默认没有智能提示,很起来不舒服。那么有没有什么替代呢?

安装powershell-7.3

我的windows 10默认安装的是powershell-5.1.19,所以我们先来升级一下。
官方安装文档:

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

我的实际下载地址是:
https://github.com/PowerShell/PowerShell/releases/download/v7.3.6/PowerShell-7.3.6-win-x64.msi

下载下来,一路next就可以了。
安装成功后,windows terminal中就会多一项出来。
在这里插入图片描述
我把它设置成默认的。
在这里插入图片描述
查看版本信息:

$PSVersionTable

在这里插入图片描述

开启自动补全

执行以下命令就可以了。

Set-PSReadLineOption -PredictionSource History

在这里插入图片描述
这下方便多了。

参考

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

猜你喜欢

转载自blog.csdn.net/lxyoucan/article/details/132082737