git: add alias for git diff excluding lock files (#8935)

master
Tvrtko Majstorović 6 years ago committed by GitHub
parent 10538d1105
commit 255ef8d587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      plugins/git/README.md
  2. 5
      plugins/git/git.plugin.zsh

@ -62,6 +62,7 @@ plugins=(... git)
| gdct | git describe --tags $(git rev-list --tags --max-count=1) |
| gds | git diff --staged |
| gdt | git diff-tree --no-commit-id --name-only -r |
| gdnolock | git diff $@ ":(exclude)package-lock.json" ":(exclude)*.lock" |
| gdv | git diff -w $@ \| view - |
| gdw | git diff --word-diff |
| gf | git fetch |

@ -86,6 +86,11 @@ alias gds='git diff --staged'
alias gdt='git diff-tree --no-commit-id --name-only -r'
alias gdw='git diff --word-diff'
function gdnolock() {
git diff "$@" ":(exclude)package-lock.json" ":(exclude)*.lock"
}
compdef _git gdnolock=git-diff
function gdv() { git diff -w "$@" | view - }
compdef _git gdv=git-diff

Loading…
Cancel
Save