From fb3f13145f958d004a30bff9d9a406d00f0fb505 Mon Sep 17 00:00:00 2001 From: "Steven G. Harms" Date: Thu, 5 Apr 2012 10:10:43 -0700 Subject: [PATCH] Adds logging functions: glo, glp (PRETTY_FORMATTER) * glo = git log --oneline * glp (FORMATTER) = git log --pretty=FORMATTER --- plugins/git/git.plugin.zsh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index e1d682508..0c00d34a2 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -30,6 +30,8 @@ alias glg='git log --stat --max-count=5' compdef _git glg=git-log alias glgg='git log --graph --max-count=5' compdef _git glgg=git-log +alias glo='git log --oneline' +compdef _git glo=git-log alias gss='git status -s' compdef _git gss=git-status alias ga='git add' @@ -60,4 +62,13 @@ compdef ggpull=git alias ggpush='git push origin $(current_branch)' compdef ggpush=git alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' -compdef ggpnp=git \ No newline at end of file +compdef ggpnp=git + +# Pretty log messages +function _git_log_prettily(){ + if ! [ -z $1 ]; then + git log --pretty=$1 + fi +} +alias glp="_git_log_prettily" +compdef glp=git-log \ No newline at end of file