PSReadLine

PSReadLine モジュールには、PowerShell でコマンド ライン編集環境をカスタマイズできるコマンドレットが含まれています。

Windows PowerShell 5.1 に付属するバージョン以降、PSReadLine には多くの更新プログラムが適用されています。

  • PowerShell 7.4.0 には PSReadLine 2.3.4 が付属しています
  • PowerShell 7.3.0 には PSReadLine 2.2.6 が付属しています
  • PowerShell 7.2.5 には PSReadLine 2.1.0 が付属しています
  • PowerShell 7.0.11 には PSReadLine 2.0.4 が付属しています
  • PowerShell 5.1 には PSReadLine 2.0.0 が付属しています

これらの記事では、PSReadLine のバージョン 2.3.4 について説明します。

Note

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.