Skip to content

Instantly share code, notes, and snippets.

@slvdrvlc
Last active November 6, 2025 06:26
Show Gist options
  • Select an option

  • Save slvdrvlc/99f045c882ffcbda21f0d0d284d062dc to your computer and use it in GitHub Desktop.

Select an option

Save slvdrvlc/99f045c882ffcbda21f0d0d284d062dc to your computer and use it in GitHub Desktop.
integrate msys2 to VSCode and JetBrains on windows inheriting the path variable from the user. optionally you can install fish with msys2, intuitive terminal, I recommend it

FOR VSCODE IN FILE settings.json

"terminal.integrated.profiles.windows": {
  "Bash": {
    "path": "C:\laragon\bin\git\bin\bash.exe",
  },
  "MSYS2": {
    "path": "C:\msys64\usr\bin\bash.exe",
    "label": "MSYS2",
    "args": ["--login", "-i"],
    "env": {
      "MSYSTEM": "MINGW64",
      "CHERE_INVOKING": "1",
      "MSYS2_PATH_TYPE": "inherit"
    },
  },
  "FISH": {
    "path": "C:\msys64\usr\bin\fish.exe",
    "label": "MSYS2",
    "args": ["--login", "-i"],
    "env": {
      "MSYSTEM": "MINGW64",
      "CHERE_INVOKING": "1",
      "MSYS2_PATH_TYPE": "inherit"
    },
  },
},

IN JETBRAINS SETTINGS->TOOLS->TERMINAL

IN ENVIRONMENT VARIABLES CONFIGURATION MSYSTEM=MINGW64;CHERE_INVOKING=1;MSYS2_PATH_TYPE=inherit IN SHELL PATH CONFIGURATION C:\msys64\usr\bin\bash.exe --login -i

@ThisNoName
Copy link

Managed to get msys2/fish shell as jetbrain default terminal. Thanks for the solution, seems the one and only on the entire wild wide web!

@ciarancourtney
Copy link

This also works as a single path solution for both wezterm and intellij:

C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -use-full-path -shell fish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment