I am using git-sdk in my Windows Terminal. "profiles"/"list" entry for it looks like this:
{
"guid": "{00000000-0000-0000-ba54-000000000002}",
"hidden": false,
"name": "Git Bash",
"tabTitle": "Git Bash",
"commandline": "\"C:\\git-sdk-64\\usr\\bin\\bash.exe\" -i -l",
"useAcrylic": false,
"startingDirectory" : "%USERPROFILE%",
"closeOnExit" : true,
"fontFace" : "Consolas",
"historySize" : 9001,
"snapOnInput" : true
}
I noticed that when I try to autocomplete git commands (like git check^TAB) it gets stuck and doesn't autocomplete anything. I have to ^C it every time it gets stuck like this.
But when I run C:\git-sdk-64\git-bash.exe everything works fine.
I tried using "\"C:\\git-sdk-64\\usr\\bin\\bash.exe\" --login -i -l", because when I run git-bash.exe for a split second this line appears as window title: /usr/bin/bash --login -i -i -l. But it didn't work.
I tried using "\"C:\\git-sdk-64\\usr\\bin\\git-cmd.exe\"" with various combinations of flags (-i/-l/--login), but git-cmd.exe doesn't seem to load my .bashrc/.profile and I sort of need them.
I also tried applying the fixes from this question - Enabling auto-completion in git bash on windows?. But they didn't work in my case, probably because I use git-sdk instead of git-bash.
EDIT1: I tried using "\"C:\\git-sdk-64\\git-bash.exe\"" -i -l but this opens git-bash in a new window instead of a new tab of Windows Terminal, which isn't what I want.
Who else uses setup like this Win Terminal + git-sdk? Have you encountered this issue? How did you resolve it?
Maybe you know where to look for git-sdk documentation on bash.exe/git-bash.exe?
2 Answers 2
To have this working as expected create a Windows environment variable called MSYSTEM and set it to your system type eg MINGW64
For a list of supported system types see git-sdk-64\etc\msystem
For how to set the environment variables in Windows 10 see here: How do I set system environment variables in Windows 10?
I'm unsure if this will cause any issues with other cygwin/mingw applications but was the best way I could find to set the variable before starting bash.exe
when I run C:\git-sdk-64\git-bash.exe everything works fine
Thus, you can to use C:\git-sdk-64\git-bash.exe instead of cryptic git-ism "\"C:\\git-sdk-64\\usr\\bin\\bash.exe\" -i -l" in "commandline", isn't it?
-
Unfortunately this opens git-bash in a new window instead of in a new tab of Windows Terminal, I tried.a_girl– a_girl2020年09月19日 10:31:08 +00:00Commented Sep 19, 2020 at 10:31
You must log in to answer this question.
Explore related questions
See similar questions with these tags.