Add git bash as terminal in Zed on Windows

tianlang 发布于2025年06月06日03:19

I built Zed on Windows 11 today, and the process was straightforward. Setting it up required only configuring Visual Studio, which didn’t take long.

I wanted to use Bash instead of PowerShell as my terminal in Zed. Initially, I set D:\software\Git\git-bash.exe as the terminal in settings.json. However, when I opened the terminal with the :term command, it launched Git Bash in a separate window outside Zed.

After some tweaking, I found a configuration that works seamlessly:

{
    "terminal": {
    "shell": {
      "with_arguments": { 
        "program": "D:\\software\\Git\\bin\\bash.exe",
        "args": ["-i", "-l"]
      }
    }
  }
}