31 Mar 2024

Tab Auto Completion of History Commands for PowerShell

收藏到CSDN网摘

PowerShell has the capability of Tab auto completion. Moreover, it also remind you the last used parameters and commands in the history as grayed out text. However, Tab cannot auto-complete these grayed-out words - they are there as the reminder to guide your typing. There are two commands to run for enabling the tab completion on these parameters/commands.
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward

No comments :

Post a Comment