Powershell PSReadLine 配置

实现类似于zsh和fish的命令高亮和提示效果

1
2
3
4
5
6
7
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineOption -Colors @{ InlinePrediction = "#666666" }
Set-PSReadLineOption -BellStyle none
Set-PSReadLineOption -HistorySearchCursorMovesToEnd