Skip to content

Instantly share code, notes, and snippets.

@cupen
Last active February 22, 2018 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cupen/9d7fec365af98de52f8f07529fcdf4a4 to your computer and use it in GitHub Desktop.
Save cupen/9d7fec365af98de52f8f07529fcdf4a4 to your computer and use it in GitHub Desktop.
Setup msys2.

Install msys2 and core packages.

pacman -Syy
pacman -S openssh
pacman -S zsh # and setup with oh-my-zsh

Add right-click menu item named "Open XXX Here"

Save this text as file named xxx.reg, and double-click it. Done.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2]
@="Open MSYS2 here"
"icon"="d:\\msys64\\msys2.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\open_msys2\command]
@="d:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec zsh'"

[HKEY_CLASSES_ROOT\Folder\shell\open_msys2]
@="Open MSYS2 here"
"icon"="d:\\msys64\\msys2.ico"

[HKEY_CLASSES_ROOT\Folder\shell\open_msys2\command]
@="d:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec zsh'"


[HKEY_CLASSES_ROOT\Directory\Background\shell\open_mingw64]
@="Open MINGW64 here"
"icon"="d:\\msys64\\mingw64.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\open_mingw64\command]
@="d:\\msys64\\mingw64.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec zsh'"

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