]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: add alias for gc --fixup and --squash
authorSamir Benmendil <me@rmz.io>
Fri, 4 Sep 2015 15:51:41 +0000 (16:51 +0100)
committerSamir Benmendil <me@rmz.io>
Fri, 4 Sep 2015 15:51:41 +0000 (16:51 +0100)
zsh/aliases/git.zsh
zsh/lib/motd.zsh

index f2673a302dc987e61faae435bb8c86eb1f1cbdc2..301a15abfb645e6a95cea181c6464b4eaf5beeac 100644 (file)
@@ -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'
index c435c050b4c2a4d9e416d15e1016f695cc7f81b4..066a96da47f1f8cff90abbab334f504b40367c86 100644 (file)
@@ -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"