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.
I like the idea, but there are challenges with it:
In short: I would be delighted to assist you in your endeavors to make this happen.
It's a windows store app so if the user selects that option it should be fairly straightforward to automatically install that.
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.
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.
@lhotamir so how about helping out? This feature request won't implement itself...
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
I suggest in Git installer, add a checkbox add Git to Windows terminal and append the new entry to Windows Terminal profiles.json
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.
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.
@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!