From Jason Shirk (@lzybkr) on November 2, 2015 18:52
To repro:
PS> function foo {}
PS> sbp -command foo
PS> foo
[DBG]: PS>> (@($availableModules | ?{ $_.SessionState -eq $null
>> }).Count
>>
>> ^C
Important to this repro - hit enter twice (so you have one blank line) before hitting Ctrl+c.
After doing this, the command line should be cancelled, but it isn't, and figuring out how to fix the error might be hard, it's sometimes easiest to just exit PowerShell at that point.
Copied from original issue: PowerShell/PSReadLine#299
From Jason Shirk (@lzybkr) on November 2, 2015 18:52
To repro:
Important to this repro - hit enter twice (so you have one blank line) before hitting Ctrl+c.
After doing this, the command line should be cancelled, but it isn't, and figuring out how to fix the error might be hard, it's sometimes easiest to just exit PowerShell at that point.
Copied from original issue: PowerShell/PSReadLine#299