PSReadLine
PSReadLine 模块包含 cmdlet,可用于在 PowerShell 中自定义命令行编辑环境。 PowerShell 7.1 随 PSReadLine v2.1 一起提供。 这些文章介绍了 PSReadLine v2.1。
注意
从 PowerShell 7.0 开始,如果检测到屏幕阅读器程序,PowerShell 将跳过在 Windows 上自动加载 PSReadLine。 目前,PSReadLine 无法很好地与屏幕阅读器配合使用。 Windows 上 PowerShell 7.0 的默认呈现和格式设置正常工作。 如有必要,可以手动加载模块。
PSReadLine
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. |