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

Test: Shell integration manual install #156001

Closed
4 tasks done
Tyriar opened this issue Jul 22, 2022 · 7 comments
Closed
4 tasks done

Test: Shell integration manual install #156001

Tyriar opened this issue Jul 22, 2022 · 7 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 22, 2022

Refs: #153921

Complexity: 3

Authors: @Tyriar, @meganrogge
Roles: Developer, Engineering Manager

Create Issue


Shell integration should be activated manually for the original shell launched in the terminal, but not in sub-shells. To workaround this you can manually install shell integration in your init scripts which will activate it even when launched outside VS Code. To test, read the updated documentation at https://github.com/microsoft/vscode-docs/blob/vnext/docs/terminal/shell-integration.md#manual-installation.

Some things to test in particular:

@hediet
Copy link
Member

hediet commented Jul 26, 2022

Shell integration is easily one of the coolest recent VS Code features 🤯

But I don't fully understand what I should test for this testplan-item (I'm a shell noob). Can you give some concrete steps?

@meganrogge
Copy link
Contributor

@meganrogge
Copy link
Contributor

created #156330 bc was going to ask if you'd seen that there's a learn more about shell integration action in the command decoration's context menu, but that link is wrong ATM

@joyceerhl
Copy link
Contributor

I installed shell activation for bash on WSL and verified that

  • automatic script injection continued to work for terminals created in VS Code with Remote-WSL

image

  • manual script injection worked for subshells, i.e. if I ran bash in the integrated terminal, command decorations continued to work (e.g. I could use them to rerun a command)

image

  • I could still create a WSL bash terminal outside of VS Code and the terminal wasn't bricked
  • inlining the script path worked (though I didn't see a perf hit in the first place)

Let me know if I missed anything in the setup, as I'm not a terminal power user and went off of the docs that @meganrogge shared 🙂

@hediet
Copy link
Member

hediet commented Jul 27, 2022

pwsh

Add the following to your PowerShell profile, replacing with VS Code's installation directory. Run code $Profile in pwsh to open the file in VS Code.

if ($env:TERM_PROGRAM -eq "vscode") {
. "\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1"
}

I am missing <InstallDir> here. I think it should be:

if ($env:TERM_PROGRAM -eq "vscode") {
. "<InstallDir>\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1"
}

@hediet hediet removed their assignment Jul 27, 2022
@deepak1556 deepak1556 removed their assignment Jul 27, 2022
@meganrogge
Copy link
Contributor

@hediet could you pls clarify what you mean above?

@hediet
Copy link
Member

hediet commented Jul 27, 2022

I think your confusion also explains my confusion :D
Markdown removed <InstallDir> from the path, both in my comment and probably also in the docs.
I updated my comment.

@tanhakabir tanhakabir removed their assignment Jul 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants