aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tt.programs.explorer.ahk48
1 files changed, 40 insertions, 8 deletions
diff --git a/tt.programs.explorer.ahk b/tt.programs.explorer.ahk
index 0779f9a..012f7df 100644
--- a/tt.programs.explorer.ahk
+++ b/tt.programs.explorer.ahk
@@ -228,17 +228,49 @@ basename(s)
#IfWinActive ahk_group Explorer
-!a::Run, % "cmd /c cd "qp()" & git add "qip()" && git status & pause"
!c::Run, % "cmd /c cd "qp()" & git commit & pause"
!+c::Run, % "cmd /c cd "qp()" & git commit --amend & pause"
-!f::Run, % "cmd /c cd "qp()" & git diff "qip()" & pause"
-!+f::Run, % "cmd /c cd "qp()" & git diff & pause"
-!i::Run, % "cmd /c cd "qp()" & git diff HEAD~1 HEAD "qip()" & pause"
-!+i::Run, % "cmd /c cd "qp()" & git diff HEAD~1 HEAD & pause"
-!l::Run, % "cmd /c cd "qp()" & git log "qip()" & pause"
-!+l::Run, % "cmd /c cd "qp()" & git log & pause"
!p::Run, % "cmd /c cd "qp()" & git push & pause"
-!r::Run, % "cmd /c cd "qp()" & git reset "qip()" && git status & pause"
!s::Run, % "cmd /c cd "qp()" & git status & pause"
+!a::
+qip := qip()
+if (qip = "")
+ Run, % "cmd /c cd "qp()" & git add . && git status & pause"
+else
+ Run, % "cmd /c cd "qp()" & git add " qip " && git status & pause"
+return
+
+!f::
+qip := qip()
+if (qip = "")
+ Run, % "cmd /c cd "qp()" & git diff & pause"
+else
+ Run, % "cmd /c cd "qp()" & git diff " qip " & pause"
+return
+
+!i::
+qip := qip()
+if (qip = "")
+ Run, % "cmd /c cd "qp()" & git diff HEAD~1 HEAD & pause"
+else
+ Run, % "cmd /c cd "qp()" & git diff HEAD~1 HEAD " qip " & pause"
+return
+
+!l::
+qip := qip()
+if (qip = "")
+ Run, % "cmd /c cd "qp()" & git log & pause"
+else
+ Run, % "cmd /c cd "qp()" & git log " qip " & pause"
+return
+
+!r::
+qip := qip()
+if (qip = "")
+ Run, % "cmd /c cd "qp()" & git reset . && git status & pause"
+else
+ Run, % "cmd /c cd "qp()" & git reset " qip " && git status & pause"
+return
+
#IfWinActive