How to add a “open git-bash here…” context menu to the windows explorer?

前端 未结 12 1727
谎友^
谎友^ 2020-11-29 16:15

How to add a context (aka right click) menu to the windows explorer that, when clicked, opens the git-bash console in the current explorer folder?

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 16:49

    Had a similar issue in adding "Start Command Prompt with Ruby" to context menu as it involves passing parameters along with the patch of cmd. Followed a similar procedure as the 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.\"\""
    

提交回复
热议问题