Created
January 14, 2016 16:39
-
-
Save joedf/d0882dee0f065cbb0d82 to your computer and use it in GitHub Desktop.
Open git shell directly from "GitHub for Windows" (GH4W).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv | |
#NoTrayIcon | |
#SingleInstance, Off | |
EnvGet, AppData_Local, LOCALAPPDATA | |
if !StrLen(AppData_Local) | |
if InStr(p := A_AppData,"\roaming") | |
AppData_Local:=SubStr(p,1,-8) "\Local" | |
else | |
ExitError("Could not find 'Local AppData'.") | |
WrkDir:=A_MyDocuments | |
if FileExist(p:=WrkDir "\GitHub") | |
WrkDir:=p | |
AppRef := AppData_Local "\GitHub\GitHub.appref-ms" | |
;######### ENV DATA - INITIALISATION END ######### | |
run, %AppRef% --open-shell, %WrkDir%, UseErrorLevel | |
if ErrorLevel | |
ExitError("Could not launch. Error code: " A_LastError) | |
ExitError(txt) { | |
MsgBox, 16, %A_ScriptName% Error, % txt | |
ExitApp | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment