Skip to content

Instantly share code, notes, and snippets.

@modulexcite
Forked from markrendle/Git Bash.vbs
Last active August 29, 2015 14:23
Show Gist options
  • Save modulexcite/51ffae3864a8cdd76c3d to your computer and use it in GitHub Desktop.
Save modulexcite/51ffae3864a8cdd76c3d to your computer and use it in GitHub Desktop.
Console2 is awesome, and makes working with the command line on Windows much easier.
The problem I had was that when I used the "Git Bash Here" item on Windows Explorer context menus,
it was using the standard command prompt shell. I tracked down the VBS script that is used by the
menu item, and modified it to launch Console2 with the Git Bash settings instead. Below is the
modified VBS script and the Git Bash tab section from my console.xml file.
Obviously path names may vary.
Set AppObj = CreateObject("Shell.Application")
If WScript.Arguments.Length=1 Then
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"" -d """ & WScript.Arguments(0) & """"
Else
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"""
End If
<tab title="Git Bash" use_default_icon="0">
<console shell="&quot;C:\Program Files\Git\bin\sh.exe&quot; --login -i"
init_dir="%HOMEDRIVE%%HOMEPATH%"
run_as_user="0"
user=""/>
<cursor style="0" r="255" g="255" b="255"/>
<background type="0" r="0" g="0" b="0">
<image file="" relative="0" extend="0" position="0">
<tint opacity="0" r="0" g="0" b="0"/>
</image>
</background>
</tab>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment