Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pwsh: Ctrl+C no longer works as before in Windows Terminal / VS Code #1980

Closed
redactedscribe opened this issue Mar 24, 2021 · 3 comments
Closed
Labels

Comments

@redactedscribe
Copy link
Contributor

After installing PowerShell Core, using Ctrl+C to terminate a process causes the terminal to end with [process exited with code 3221225786] every time, thus a new terminal be launched to issue any new commands. Quite annoying. An explanation can be read here.

As the linked article explains, the fix is to make sure applications that use the shell, e.g. Windows Terminal and VS Code, point to scoop's ...\apps\pwsh\current\pwsh.exe, as by default, the pwsh.exe shim is being used, which is the source of the problem.

Could a warning or tip be printed after the installation of pwsh to make users aware that they should update their config files?

For Windows Terminal's <profile>.ps1:

"list":
[
    {
        "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
        "name": "PowerShell",
        // ...
        "commandline": "%USERPROFILE%\\scoop\\apps\\pwsh\\current\\pwsh.exe"
    },

For VS Code's settings.json:

{
    "terminal.integrated.shell.windows": "c:\\users\\<username>\\scoop\\apps\\pwsh\\current\\pwsh.exe"
}

Thanks.

@redactedscribe redactedscribe changed the title pwsh: Print warning after installing PowerShell pwsh: Ctrl+C no longer works as before in Windows Terminal / VS Code Mar 24, 2021
@HUMORCE
Copy link
Member

HUMORCE commented Mar 25, 2021

@Vechro
Copy link

Vechro commented Apr 3, 2021

Yeah this is a shim problem but there's a less painful fix by changing the shim (as described in the issue links above) if you execute the following commands

scoop config shim kiennq
scoop reset *

@stale
Copy link

stale bot commented Oct 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 27, 2021
@stale stale bot closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants