PSReadLine Module
PSReadLine 模块包含 cmdlet,可用于在 PowerShell 中自定义命令行编辑环境。
自 Windows PowerShell 5.1 中随附的版本以来,PSReadLine 有许多更新。
- v2.3.5 首先在 PowerShell 7.4.2 和 7.5.0-preview.3 中发布
- v2.3.4 首次在 PowerShell 7.4.0-rc.1 中发布
- v2.2.6 首次在 PowerShell 7.3.0 中发布
- v2.1.0 首先在 PowerShell 7.2.5 中发布
- v2.0.4 首次在 PowerShell 7.0.11 中发布
- v2.0.0 随附在 Windows PowerShell 5.1 中
有关版本差异的详细信息,请参阅 about_PSReadLine_Release_Notes。
这些文章介绍了 PSReadLine 版本 2.3.5。
注释
从 PowerShell 7.0 开始,如果检测到屏幕阅读器程序,PowerShell 将跳过在 Windows 上自动加载 PSReadLine。 目前,PSReadLine 不适用于屏幕阅读器。 Windows 上 PowerShell 7.0 的默认呈现和格式设置正常工作。 如有必要,可以手动加载模块。
PSReadLine Cmdlet
Cmdlet | 说明 |
---|---|
Get-PSReadLineKeyHandler |
Gets the key bindings for the PSReadLine module. |
Get-PSReadLineOption |
Gets values for the options that can be configured. |
PSConsoleHostReadLine |
This function is the main entry point for PSReadLine. |
Remove-PSReadLineKeyHandler |
Removes a key binding. |
Set-PSReadLineKeyHandler |
Binds keys to user-defined or PSReadLine key handler functions. |
Set-PSReadLineOption |
Customizes the behavior of command line editing in PSReadLine. |