PSReadLine Module
PSReadLine 模組包含 Cmdlet,可讓您在 PowerShell 中自定義命令行編輯環境。 PowerShell 7.1 隨 PSReadLine v2.1 一起提供。 這些文章介紹了 PSReadLine v2.1。
備註
從 PowerShell 7.0 開始,如果偵測到螢幕助讀程式程式,PowerShell 會略過 Windows 上的自動載入 PSReadLine。 目前,PSReadLine 不適用於螢幕助讀程式。 Windows 上 PowerShell 7.0 的預設轉譯和格式設定可正常運作。 您可以視需要手動載入模組。
PSReadLine Cmdlet
| 指令程式 | Description |
|---|---|
| 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. |