如何向windows资源管理器添加上下文菜单(也称为右键单击),当单击该菜单时,会打开当前资源管理器文件夹中的git-bash控制台?
发布于 2017-04-25 03:55:42
以下是直接从Windows installer -Git GUI为Git GUI和Git Bash导出的注册表导出(*.reg
文件):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]
@="Git &GUI Here"
"Icon"="C:\\Program Files\\Git\\cmd\\git-gui.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui\command]
@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""
Git bash:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]
@="Git Ba&sh Here"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
有关*.reg
文件的详细信息,请参阅微软的“How to add, modify, or delete registry subkeys and values by using a .reg file”。
发布于 2017-03-16 07:49:00
对我来说起作用的几乎是这样,但使用以下REGEDIT路径:
HKEY_LOCAL_MACHINE/SOFTWARE/Classes/Directory/background/shell
,在这里我创建了key Bash,使用我想要的显示名称的值,然后在这个命名命令下创建了另一个键,值作为git-bash.exe的路径
我在Windows10上安装了一个新的git,由于某些原因没有自动添加(git版本2.12.0 64位)
发布于 2018-03-02 17:47:42
在将“用Ruby启动命令提示符”添加到上下文菜单时遇到了类似的问题,因为它涉及到随cmd补丁一起传递参数。遵循与solution above类似的过程
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Cmd With Ruby]
@="Cmd With Ruby"
"Icon"="C:\\Windows\\System32\\cmd.exe"
[HKEY_CLASSES_ROOT\*\shell\Cmd With Ruby\command]
@="\"C:\\Windows\\System32\\cmd.exe\" \"/E:ON /K
\"C:\\Ruby25-x64\\bin\\setrbvars.cmd\"\" \"--cd=%1\"\""
[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Cmd With Ruby"
"Icon"="C:\\Windows\\System32\\cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="\"C:\\Windows\\System32\\cmd.exe\" \"/E:ON /K
\"C:\\Ruby25-x64\\bin\\setrbvars.cmd\"\" \"--cd=%1\"\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]
@="Cmd With Ruby"
"Icon"="C:\\Windows\\System32\\cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="\"C:\\Windows\\System32\\cmd.exe\" \"/E:ON /K
\"C:\\Ruby25-x64\\bin\\setrbvars.cmd\"\" \"--cd=%v.\"\""
https://stackoverflow.com/questions/24386657
复制相似问题