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 [email protected]:njzhangyifei/msys2-mingw-shortcut-menus.gitinto your desired directory to install- Or
git clone https://github.com/njzhangyifei/msys2-mingw-shortcut-menus.gitwhen git via ssh is not available
- Or
./installand follow the instructions. Use./install --userfor current user only- double-click
install_right_click_menu.regfile to merge it into your windows registry - (Optional) If you don't see icons in the context menu, please install
msys2-launchervia 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.cmdin your MSYS2 install directory. You will also need to changeTEMPLATE_SHELLin 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
.regfile. That's ALL you need to create this context menu. You can delete this directory after merging the.regfile.
- For the MSYS2 version with
start_shell.cmd, the script will usebash_here_start_shell.templatefor generating bash scripts.- You MUST have environmental variable
$HOMEdefined 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.cmdand(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
