PS version: 5.1.16288.1
PSReadline version: 1.2
os: 10.0.16288.1 (WinBuild.160101.0800)
PS file version: 10.0.16288.1 (WinBuild.160101.0800)
I am unable to set the psreadline shortcut key "alt+uparrow" for complete function..
fyi, "ctrl+UpArrow" works..
PS C:\Users\bagajjal> Set-PSReadlineKeyHandler -Chord 'Alt+UpArrow' -Function Complete
I'm not sure this can be supported easily - Console.ReadKey
doesn't return when you type Alt+UpArrow
.
Pure speculation - but I would guess the Alt+numpad support in .Net gets in the way of this working.
I may move away from Console.ReadKey
at some point, but those plans will force depending on Win10 Creators Update or later.
This is supported now if you set the environment variable PSREADLINE_VTINPUT=1
before starting PowerShell.
@parkovski This didn't work for me, since setting PSREADLINE_VTINPUT=1 causes Ctrl+0 (or other numbers) in PSReadLine to crash PowerShell.exe. This is with PSReadLine 2.0.0 (final, not beta) on Windows 10 v1909 x64.