Skip to content

Instantly share code, notes, and snippets.

@xiconet
Forked from ThatRendle/Git Bash.vbs
Created May 19, 2017 18:34
Show Gist options
  • Save xiconet/da33d132c3904da66b5b63c7ad5051df to your computer and use it in GitHub Desktop.
Save xiconet/da33d132c3904da66b5b63c7ad5051df to your computer and use it in GitHub Desktop.
Modified Git Bash to use Console2
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