








# 安装:´PSReadLine´ version 2.1.0
Install-Module PSReadLine -RequiredVersion 2.1.0
# 初始化:
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
Test-path $profile
# 如果返回是‘false’ 执行下面:
New-item –type file –force $profile
# 如果返回是ture,或者上一步创建好,直接下一步
# 编辑profile配置文件:
notepad $profile
# Shows navigable menu of all options when hitting Tab
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
# Autocompletion for arrow keys
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
# auto suggestions
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
# 保存之后,退出。
以上内容自己整理 参考自: https://blog.csdn.net/weixin_42081389/article/details/124392018
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。