cygwin添加到右键菜单方法

2013年5月4日 | 分类: 日志 | 标签:

假定cygwin安装目录为C:\cygwin,在文件夹右键菜单里添加cygwin直接转到该文件夹路径方法如下:
1.在c:\cygwin目录下新建文件cygwin2.bat,内容如下

@echo off
@cd /d %1
set CHERE_INVOKING=1
C:\cygwin\bin\bash --login -i
exit

2.修改注册表,把下面内容保存为a.reg然后打开导入注册表即可

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cygwin]
@="cygwin"

[HKEY_CLASSES_ROOT\Directory\shell\cygwin\command]
@="C:\\cygwin\\cygwin2.bat \"%1\""

或者手动修改:在HKEY_CLASSES_ROOT\Directory\shell\添加项cygwin(名字不重要),默认值为菜单里显示的文本cygwin(tip:加一个&在c前面可以用c键快速定位),在此项里添加command项,默认值为C:\cygwin\cygwin2.bat "%1"

3.使用mintty

推荐使用mintty替换cmd窗口,mintty下载地址:https://code.google.com/p/mintty/downloads/list

修改cygwin2.bat里的

C:\cygwin\bin\bash --login -i

start C:\cygwin\bin\mintty.exe -

把对应版本的mintty.exe拷到C:\cygwin\bin\目录中即可。

目前还没有任何评论.

[cusFace:84] [cusFace:83] [cusFace:82] [cusFace:79] [cusFace:67] [cusFace:66] [cusFace:65] [cusFace:54] [cusFace:53] [cusFace:52] [cusFace:51] [cusFace:50] [cusFace:49] [cusFace:48] [cusFace:47] [cusFace:44] [cusFace:43] [cusFace:42] [cusFace:41] [cusFace:40] [cusFace:39] [cusFace:38] [cusFace:37] [cusFace:36] [cusFace:35] [cusFace:34] [cusFace:33] [cusFace:32] [cusFace:31] [cusFace:30] [cusFace:29] [cusFace:28] [cusFace:27] [cusFace:26] [cusFace:25] [cusFace:24] [cusFace:23] [cusFace:22] [cusFace:21] [cusFace:20] [cusFace:19] [cusFace:18] [cusFace:17] [cusFace:16] [cusFace:15] [cusFace:14] [cusFace:13] [cusFace:12] [cusFace:11] [cusFace:10] [cusFace:09] [cusFace:08] [cusFace:07] [cusFace:06] [cusFace:05] [cusFace:04] [cusFace:03] [cusFace:02] [cusFace:01] [cusFace:00]