vscode-powershell
vscode-powershell copied to clipboard
(Preview) PSReadLine Keyboard Commands do not work in the PowerShell Integrated Console (OSX)
System Details Output
### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
### PSES version: 2.0.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.0.0-preview.2
PSEdition Core
GitCommitId 7.0.0-preview.2
OS Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
PSReadLine Keyboard Commands do not work in the PowerShell Integrated Console
Expected Behaviour
Using keyboard combinations which are bound are executed.
Actual Behaviour
Attempting to use any keyboard commands does not work.
e.g. pressing Ctrl+l does nothing, even though it's bound by default to the below action
Ctrl+l ClearScreen Clear the screen and redraw the current line at the top of the screen
Attached Logs
N\A
Additional Notes
[email protected] is disabled, I'm using [email protected]
@eedwards-sk thanks for opening this issue, it looks like this is a unix specific bug... @TylerLeonhardt might have more context on this
Hmm I can't repro this behavior. Ctrl+l does clear the screen for me.
@eedwards-sk what version of PSReadLine do you have? (Get-Module PSReadLine)
Get-Module PSReadLine does not work from inside the integrated terminal.
If from inside the terminal I then run pwsh-preview (so it's running an interactive session with pwsh-preview directly), then Get-Module PSReadLine works fine (returning 2.0.0) and keyboard shortcuts work as expected.
Also, manually importing PSReadLine inside the integrated terminal session (Import-Module PSReadLine) does allow Get-Module PSReadLine to return, however it does not cause keyboard shortcuts to work.
I'll need to talk to @rjmholt about this. I suspect it has something to do with how we're loading PSReadLine at start up...
Do you happen to have PowerShell 6.2 available? I'd like to see if the issue happens with that version as well
Not exactly sure how to tell VSCode which psversion to use, but after installing ps6.2, it did switch to it.
I was able to repro on 6.2 as well.
PS /Users/eedwards/dev/mise> $PSVersionTable
Name Value
---- -----
PSVersion 6.2.2
PSEdition Core
GitCommitId 6.2.2
OS Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Get-Module PSReadLine returns nothing, and Import-Module PSReadLine works to allow Get-Module PSReadLine, but still doesn't provide any readline functionality.
Works fine if I run pwsh from inside the integrated console.
So basically, exact same symptoms with 6.2 as with 7.0preview2
This issue is being closed as inactive, if this issue is still occurring it will be re-opened
Still Occurring...
Bot is trigger happy
Hey @eedwards-sk, is this still an issue with the latest preview?