Condividi tramite


PSReadLine Module

Il modulo PSReadLine contiene cmdlet che consentono di personalizzare l'ambiente di modifica della riga di comando in PowerShell.

Sono stati apportati molti aggiornamenti a PSReadLine dalla versione fornita in Windows PowerShell 5.1.

  • PowerShell 7.4.0 viene fornito con PSReadLine 2.3.4
  • PowerShell 7.3.0 viene fornito con PSReadLine 2.2.6
  • PowerShell 7.2.5 viene fornito con PSReadLine 2.1.0
  • PowerShell 7.0.11 viene fornito con PSReadLine 2.0.4
  • PowerShell 5.1 viene fornito con PSReadLine 2.0.0

Questi articoli documentano la versione 2.2.6 di PSReadLine.

Annotazioni

A partire da PowerShell 7.0, PowerShell ignora il caricamento automatico di PSReadLine in Windows se viene rilevato un programma per la lettura dello schermo. Attualmente PSReadLine non funziona bene con i lettori di schermo. Il rendering e la formattazione predefiniti di PowerShell 7.0 in Windows funzionano correttamente. Se necessario, è possibile caricare manualmente il modulo.

Cmdlet PSReadLine

Cmdlet Descrizione
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.