This is all the configuration files needed for adding "bash here" options in the Windows right-click shortcut/context menu.
This implementation should work for MSYS2 and MINGW32/64 shells that come with MSYS2.
- Make sure environment variable
%HOME%
exists. (This script will source%HOME%/.bash_profile
) git clone git@github.com:njzhangyifei/msys2-mingw-shortcut-menus.git
into your desired directory to install- Or
git clone https://github.com/njzhangyifei/msys2-mingw-shortcut-menus.git
when git via ssh is not available
- Or
./install
and follow the instructions. Use./install --user
for current user only- double-click
install_right_click_menu.reg
file to merge it into your windows registry - (Optional) If you don't see icons in the context menu, please install
msys2-launcher
via pacman (pacman -S msys/msys2-launcher-git
) or from source https://github.com/elieux/msys2-launcher
- This script does NOT depend on
cygpath
. - If you are using Zsh, please copy-and-edit a
msys2_shell_zsh.cmd
in your MSYS2 install directory. You will also need to changeTEMPLATE_SHELL
in the install script tozsh
. For example template, please seereg_aio_zsh_msys2_shell_example.template
. - If you are using msys2 with filesystem newer than 2016.05-2, this script will
only generate one
.reg
file. That's ALL you need to create this context menu. You can delete this directory after merging the.reg
file.
- For the MSYS2 version with
start_shell.cmd
, the script will usebash_here_start_shell.template
for generating bash scripts.- You MUST have environmental variable
$HOME
defined as your home directory path.
- You MUST have environmental variable
- To use shell other than
bash
(e.g. to usezsh
), you might want to create astart_shell_zsh.cmd
and(mingw*/msys2)_shell_zsh.bat
. Then, you will need to modify either the template or the bash script generated to call the corresponding batch file.
The MIT License (MIT) 2015 Yifei Zhang