2

我想在 powershell 7 中获得历史匹配,例如:当我键入npm 和箭头键时,它会显示我最后一个以关键字(例如:)up开头的命令。npmnpm run build

我能够在 powershell 5 here中实现这一点。但这在 7 中不起作用。当我运行讨论的命令时:

Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward

我收到如下错误:

Update-Module: A parameter cannot be found that matches parameter name 'Key'.
4

0 回答 0