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

Support Git Bash shell integration automatic injection #143769

Closed
IllusionMH opened this issue Feb 23, 2022 · 7 comments · Fixed by #208960
Closed

Support Git Bash shell integration automatic injection #143769

IllusionMH opened this issue Feb 23, 2022 · 7 comments · Fixed by #208960
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes terminal-shell-git-bash An issue in the terminal specific to git bash on Windows terminal-shell-integration Shell integration, command decorations, etc. verification-needed Verification of issue is requested verified Verification succeeded windows VS Code on Windows issues
Milestone

Comments

@IllusionMH
Copy link
Contributor

There are various issues regarding integration for various shells, but for Windows it's limited to standalone pwsh, and there are open issue for WSL.

So request here is to support Git Bash as well as it's go to terminal if you install Git for Windows.

Are there plans to support it in near future?

/cc @Tyriar

@Tyriar
Copy link
Member

Tyriar commented Feb 23, 2022

I'm hesitant committing to this as weird things often happen with how git bash interacts with conpty. Could be a good community contribution though.

I tried setting up a profile based on the existing bash script:

"Git Bash+": {
  "source": "Git Bash",
  "args": ["--init-file", "C:\\Github\\microsoft\\vscode\\src\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration-bash.sh"]
},

It does look like the sequences get through correctly, the same problems as on wsl (#143761) with decorations are happening though:

image

So I'd expect the work here to include:

@Tyriar Tyriar added feature-request Request for new features or functionality terminal-shell-integration Shell integration, command decorations, etc. windows VS Code on Windows issues labels Feb 23, 2022
@Tyriar Tyriar added this to the Backlog milestone Feb 23, 2022
@Tyriar Tyriar added help wanted Issues identified as good community contribution opportunities and removed help wanted Issues identified as good community contribution opportunities labels Feb 23, 2022
@Tyriar
Copy link
Member

Tyriar commented Mar 1, 2022

See update: #143761 (comment)

@Tyriar
Copy link
Member

Tyriar commented Aug 9, 2022

Cross-posting update from #157548 (comment)

Thanks for the interest, git bash was on hold in #143769 due to some issues I thought would apply to it since running WSL in a sub-shell had some problems. I just tested it with @meganrogge now and it seems to work pretty well and a minor change will improve it further. So I think for August we'll try adapt the bash shell integration script to support MINGW/Cygwin/etc. and then document it as a manual install only/experimental option on the website https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation

@Tyriar
Copy link
Member

Tyriar commented Aug 9, 2022

I'll keep this issue open until it's non-experimental, making a note to write a test for endgame

aiday-mar pushed a commit to aiday-mar/vscode-docs that referenced this issue Aug 23, 2022
@Tyriar Tyriar modified the milestones: August 2022, On Deck Aug 25, 2022
@Tyriar Tyriar removed the on-testplan label Dec 7, 2022
@Tyriar Tyriar changed the title Shell integration for Git Bash Support Git Bash shell integration automatic injection Dec 7, 2022
@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label Dec 7, 2022
@Tyriar
Copy link
Member

Tyriar commented Dec 7, 2022

Similar to the fish support #139400, we'll keep this open for now until we get automatic injection setup.

@Tyriar Tyriar modified the milestones: On Deck, April 2024 Mar 28, 2024
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Mar 28, 2024
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Apr 4, 2024
@Tyriar Tyriar added the verification-needed Verification of issue is requested label Apr 22, 2024
@andreamah
Copy link
Contributor

How can we test this in git bash?

@andreamah andreamah added the verification-steps-needed Steps to verify are needed for verification label Apr 24, 2024
@Tyriar
Copy link
Member

Tyriar commented Apr 24, 2024

To verify open git bash via the terminal profile picker and make sure the shell integration circle shows on the left side

@Tyriar Tyriar removed the verification-steps-needed Steps to verify are needed for verification label Apr 24, 2024
@rzhao271 rzhao271 added the verified Verification succeeded label Apr 24, 2024
@Tyriar Tyriar added the on-release-notes Issue/pull request mentioned in release notes label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes terminal-shell-git-bash An issue in the terminal specific to git bash on Windows terminal-shell-integration Shell integration, command decorations, etc. verification-needed Verification of issue is requested verified Verification succeeded windows VS Code on Windows issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants