Closed aranwe closed 4 months ago
Interesting - I have found a file:
~\.inshellisense\key-bindings-pwsh.ps1
with contents:
Set-PSReadLineKeyHandler -Chord 'Ctrl+a' -ScriptBlock {
$command = $null
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$command, [ref]$null)
$oldPrompt = $function:prompt
function prompt { "`r" }
[Microsoft.PowerShell.PSConsoleReadLine]::InvokePrompt()
$prompt = $oldPrompt
[Microsoft.PowerShell.PSConsoleReadLine]::ClearKillRing()
[Microsoft.PowerShell.PSConsoleReadLine]::BeginningOfLine()
[Microsoft.PowerShell.PSConsoleReadLine]::KillLine()
$inshellisense = "$env:USERPROFILE\AppData\Roaming\npm\node_modules\@microsoft\inshellisense\build\index.js"
if ($command) {
Start-Process -NoNewWindow -Wait "node" "$inshellisense -c $command -s pwsh"
}
else {
Start-Process -NoNewWindow -Wait "node" "$inshellisense -s pwsh"
}
$executedCommand = node $inshellisense --history
if ($executedCommand) {
[Microsoft.PowerShell.PSConsoleReadLine]::AddToHistory($executedCommand)
}
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
}
that pretty much sets the ctrl+a behaviour -> is this intended as I do not recall creating this config file.
@aranwe you can run is uninstall
to remove any of the leftover artifacts from previous releases. This key binding was part of an early release that has been fully removed now.
Describe the bug When I press Ctrl-A in powershell (7) in Windows Terminal the prompt closes (deleting anything written) and inshellisense restarts with message:
inshellisense session [live]
To Reproduce Steps to reproduce the behavior:
Expected behavior Powershell selects all text in the current prompt
Environment
is --version
: 0.0.1-rc.7Additional context Add any other context about the problem here.