Use CTRL + D to exit and CTRL + L to cls in Powershell console

前端 未结 6 1528
说谎
说谎 2021-02-01 13:13

I am trying to make

CTRL + D - exit Powershell console

and

CTRL + L - clear the screen

like in bash.

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 13:37

    Old question, but with PowerShell 5.1 and PowerShell Core 6.x and later:

    Set-PSReadlineKeyHandler -Key ctrl+d -Function ViExit

提交回复
热议问题