PowerShell(7) 配置 PSReadLine 历史记录和提示
具体参考官方文档 PSReadLine
-
安装模块
-
Install-Module -Name PowerShellGet -Force Install-Module PSReadLine -
Get-InstalledModule # 查看已安装模块
-
-
复制下面命令到powershell 终端
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } code $PROFILE此时会打开一个配置文件,在配置文件中添加下面这些命令
Import-Module PSReadLine Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -ShowToolTips -
重启 PowerShell