Skip to content

Instantly share code, notes, and snippets.

@slvdrvlc
Last active February 28, 2024 15:58
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save slvdrvlc/99f045c882ffcbda21f0d0d284d062dc to your computer and use it in GitHub Desktop.
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!

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