Windows下Cygwin添加右键菜单

在http://herry2013git.blog.163.com/blog/static/2195680112013437139447/看到一篇文章,将Cypwin加入右键菜单,方便使用。

为了更傻瓜,做了一点改动,仅仅是为了方便配置,谢谢作者无私奉献。

1、重写Cygwin目录下的Cygwin.bat:
@echo off
set _T=%CD%
echo %_T
G:
chdir G:envcygwinin
  
@rem bash --login -i
start mintty.exe -e /bin/bash --login -i
2、修改.bash_profile文件,位于安装目录/home/(用户名)下。
export _T=${_T//\//}
if [ $_T == "" ]; then
export _T=~
fi
cd "$_T"
3、增加右键菜单。将下列代码存为一个reg文件,假设addMenu.reg:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCygwin]

[HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCygwincommand]
@="G:\env\cygwin\Cygwin.bat"
4、双击运行addMenu.reg,完成操作。
原文地址:https://www.cnblogs.com/liushijie/p/4712919.html