From a3202984f1ddcc27ad22d2d9b23e7e0fe72c79c3 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 4 Sep 2015 16:51:41 +0100 Subject: [PATCH] zsh: add alias for gc --fixup and --squash --- zsh/aliases/git.zsh | 4 ++++ zsh/lib/motd.zsh | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/zsh/aliases/git.zsh b/zsh/aliases/git.zsh index f2673a3..301a15a 100644 --- a/zsh/aliases/git.zsh +++ b/zsh/aliases/git.zsh @@ -13,6 +13,10 @@ alias gd='git diff' alias gdc='git diff --cached' alias gc='git commit -v' compdef _git gc=git-commit +alias gcs='git commit -v --squash' +compdef _git gcs=git-commit +alias gcf='git commit -v --fixup' +compdef _git gcf=git-commit alias gca='git commit -v -a' compdef _git gca=git-commit alias gco='git checkout' diff --git a/zsh/lib/motd.zsh b/zsh/lib/motd.zsh index c435c05..066a96d 100644 --- a/zsh/lib/motd.zsh +++ b/zsh/lib/motd.zsh @@ -10,11 +10,6 @@ msg() print "$fg_bold[white]$1$reset_color\n$2\n" } -msg "gc --{fixup,squash} :/commitmsg " \ -"auto constructs a '{fixup,squash}!' commit message for the last commit matching -'commitmsg'" -msg "git rebase --autosquash " \ -"{fixup,squash} commits starting with {fixup,squash}!, must be --interactive" short "[count][\"x]gr{motion}" 'Replace {motion} text with the contents of register x.' short ":Cd" "lcd %:h" short ":Cr" "goto git root or home" -- 2.48.1