From 3c722876ef82881e5924cbafef70bc880ab58117 Mon Sep 17 00:00:00 2001 From: Corvin Mcpherson Date: Tue, 14 Apr 2015 17:07:24 -0400 Subject: [PATCH 1/3] Fixed typo for git diff-tree --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9da448814..94a2c4d1a 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -8,7 +8,7 @@ compdef _git gd=git-diff alias gdc='git diff --cached' compdef _git gdc=git-diff alias gdt='git diff-tree --no-commit-id --name-only -r' -compdef _git gdc=git diff-tree --no-commit-id --name-only -r +compdef _git gdt=git diff-tree --no-commit-id --name-only -r alias gl='git pull' compdef _git gl=git-pull alias gup='git pull --rebase' From bcbe735dc6263bd222b97abda44da330ce4ea79e Mon Sep 17 00:00:00 2001 From: Corvin Mcpherson Date: Tue, 14 Apr 2015 17:10:01 -0400 Subject: [PATCH 2/3] Fixed conflict between gcc d compiler and gdc alias --- plugins/git/git.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 94a2c4d1a..3d85fed31 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -5,8 +5,13 @@ alias gst='git status' compdef _git gst=git-status alias gd='git diff' compdef _git gd=git-diff + +#Dont add alias if gdc (GCC D Compiler) is present +command -v gdc >/dev/null 2>&1 || { alias gdc='git diff --cached' compdef _git gdc=git-diff +} + alias gdt='git diff-tree --no-commit-id --name-only -r' compdef _git gdt=git diff-tree --no-commit-id --name-only -r alias gl='git pull' From 5531df7aa58a4efb29188e584de599145939ce08 Mon Sep 17 00:00:00 2001 From: Corvin Mcpherson Date: Tue, 14 Apr 2015 17:28:51 -0400 Subject: [PATCH 3/3] Removed gdt git difftool alias because gdt is already used for git diff-tree --- plugins/git/git.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 3d85fed31..86eb5d37d 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -23,7 +23,10 @@ compdef _git gp=git-push alias gd='git diff' gdv() { git diff -w "$@" | view - } compdef _git gdv=git-diff -alias gdt='git difftool' + +#We are using the same alias for git diff-tree +#alias gdt='git difftool' + alias gc='git commit -v' compdef _git gc=git-commit alias gc!='git commit -v --amend'