X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/0610542002bc5d0740ec24a042db5b40a487e777..5dc4d9aa8c7835d46aeb8afc2123c5e344a58df4:/.zsh/zshrc/85-git?ds=sidebyside diff --git a/.zsh/zshrc/85-git b/.zsh/zshrc/85-git new file mode 100644 index 0000000..d60ce99 --- /dev/null +++ b/.zsh/zshrc/85-git @@ -0,0 +1,30 @@ +# +# set up git aliases and functions +# +# Copyright © 2018 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: http://git.madduck.net/v/etc/zsh.git +# + +alias g=git +alias g\?='alias -rm g g[a-z]' +alias gi='g init' +alias gl='g clone' +alias ga='g add' +alias gc='g commit' +alias gs='g status' +alias gd='g diff' +alias gg='g pull' +alias gr='g rebase' +alias gp='g push' + +function gtestfile() { + local fname="${1:-$(tempfile -d ${PWD})}" + local fname="${fname##*/}" + echo "${(%):-"%D{%c}"}" >| "$fname" + ga "$fname" + gc -m"add test file $fname" +} + +# vim:ft=zsh