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

Feature: Support "windows terminal" in addition to mintty and cmd #2621

Closed
Diggsey opened this issue May 12, 2020 · 12 comments
Closed

Feature: Support "windows terminal" in addition to mintty and cmd #2621

Diggsey opened this issue May 12, 2020 · 12 comments

Comments

@Diggsey
Copy link

Diggsey commented May 12, 2020

When installing I'm presented with the option to use either mintty or cmd with git bash. Windows terminal would be a good option to add going forward as it is officially supported by Microsoft, but is not... like cmd.

@dscho
Copy link
Member

dscho commented May 12, 2020

I like the idea, but there are challenges with it:

  • We cannot bundle Windows Terminal, so we'd have to somehow detect its presence
  • Last time I checked, there were some funny issues when resizing the window, and that's when I stopped checking whether Windows Terminal is compatible with Git for Windows. Admittedly, this has been a long time ago.
  • The Git for Windows project is not really in need of more feature requests, but in need of more contributors taking care of such feature requests. I really hope that you turn out to be such a contributor.

In short: I would be delighted to assist you in your endeavors to make this happen.

@Diggsey
Copy link
Author

Diggsey commented May 13, 2020

It's a windows store app so if the user selects that option it should be fairly straightforward to automatically install that.

@dscho
Copy link
Member

dscho commented May 13, 2020

It's a windows store app so if the user selects that option it should be fairly straightforward to automatically install that.

Yep. Go right ahead implementing that.

@lhotamir
Copy link

This would be a great feature. I already use git bash with windows terminal, but I cannot get it to work in the xterm-256color mode. I cannot understand why, since git bash works in mintty with this mode, and for example cygwin bash works in windows terminal with this mode too.

@dscho
Copy link
Member

dscho commented May 30, 2020

@lhotamir so how about helping out? This feature request won't implement itself...

@noinkling
Copy link

noinkling commented Nov 15, 2020

Just for reference:

https://docs.microsoft.com/en-us/windows/terminal/command-line-arguments

wt.exe is made available in the PATH when installed, for me it's located at %LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe

It seems to always open a new window, rather than adding a tab to an existing one. I tried resource hacking the git-bash.exe command string (still using usr/bin/bash.exe), which launched it ok, but the environment variables weren't set correctly, e.g. MSYSTEM. They are set when using bin/bash.exe instead however.

On the Windows Terminal side there's an effort to allow third party programs to add/modify profiles, which might be useful in the future: https://github.com/microsoft/terminal/blob/main/doc/specs/Proto%20extensions-spec.md

There's also a request to add a profile for Git Bash by default if it's installed, similar to what already happens with WSL: microsoft/terminal#1394

@linquize
Copy link

I suggest in Git installer, add a checkbox add Git to Windows terminal and append the new entry to Windows Terminal profiles.json

@fourpastmidnight
Copy link

The last time I added G4w bash to Windows Terminal, it mostly worked, but not everything. Anyway, it was enough that I opted to remove it from Windows Terminal and keep using mintty.

Unless something has significantly changed, I think maybe this shouldn't be part of the official G4w installer, as it may become a steady source of issues which will become a distraction to the g4w team.

At most, I might provide instructions on the Readme for adding g4w to the Windows Terminal with a disclaimer that g4w will not support any issues from running it in Windows Terminal.

@noinkling
Copy link

noinkling commented Nov 16, 2020

I'll just say that Windows Terminal has been steadily improving, and it's intended to eventually supersede conhost as the default terminal on Windows. I think as time progresses you'll see more people looking for a quick/easy way to use Git Bash with it, even if it's just silently providing a profile on install if/when that RFC that I linked above comes to fruition.

@dscho
Copy link
Member

dscho commented Nov 16, 2020

@noinkling I am definitely not opposed to including this as an experimental feature in the Git for Windows installer. It's just that somebody has to do the work, and that somebody isn't me. If that somebody is you, here are a couple of pointers:

Feel free to ask questions!

@Okeanos
Copy link

Okeanos commented Jul 17, 2021

@dscho based on recent releases of Git that include the Windows Terminal Fragment (#3183) is this still relevant?

@dscho
Copy link
Member

dscho commented Jul 17, 2021

Good point! Thanks @Okeanos for paying attention.

@dscho dscho closed this as completed Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants