ikas-mc / ContextMenuForWindows11

Add Custom Context Menu For Windows11
GNU Lesser General Public License v3.0
1.86k stars 90 forks source link

如何增加 git bash here的菜单按钮 #83

Closed zeng865170091 closed 1 year ago

zeng865170091 commented 1 year ago

描述问题

我想创建一个git bash here的按钮,但是我不会设置参数

复现步骤

这是我的配置 {"title":"Git Bash Here","exe":"\"D:\Program Files\Git\git-bash.exe\"","param":"\"{path}\"","icon":"\"D:\Program Files\Git\git-bash.exe\",0","acceptExts":"*","acceptDirectory":true,"acceptFile":true,"acceptMultipleFilesFlag":1,"pathDelimiter":"","paramForMultipleFiles":"","index":3}

期望结果

能够正确的打开一个gitbash的窗口,且运行的位置是我当前想要打开的位置

实际结果

当我在桌面点击按钮时出现的错误:

bash: D:\SystemFolder\Desktop: Is a directory /usr/bin/bash: Exit 126.

系统环境

ikas-mc commented 1 year ago

参数错了,如下写

--cd="{path}"
{
    "title":"Git bash here",
    "exe":"\"C:\\Program Files\\Git\\git-bash.exe\"",
    "param":"--cd=\"{path}\"",
    "icon":"\"C:\\Program Files\\Git\\git-bash.exe\",0",
    "acceptExts":"",
    "acceptDirectory":true,
    "acceptFile":false,
    "acceptMultipleFilesFlag":0,
    "pathDelimiter":"",
    "paramForMultipleFiles":"",
    "index":0
}