mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 19:31:43 +00:00
Cleaned up lib/ and removed trailing white space everywhere.
Conflicts: oh-my-zsh.sh
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
# Aliases
|
||||
alias g='git'
|
||||
compdef g=git
|
||||
alias gst='git status'
|
||||
@ -27,24 +26,12 @@ alias gcp='git cherry-pick'
|
||||
compdef _git gcp=git-cherry-pick
|
||||
alias glg='git log --stat --max-count=5'
|
||||
compdef _git glg=git-log
|
||||
|
||||
# Git and svn mix
|
||||
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
|
||||
compdef git-svn-dcommit-push=git
|
||||
|
||||
#
|
||||
# Will return the current branch name
|
||||
# Usage example: git pull origin $(current_branch)
|
||||
#
|
||||
function current_branch() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
# these aliases take advantage of the previous function
|
||||
alias ggpull='git pull origin $(current_branch)'
|
||||
alias ggpull='git pull origin $(git_current_branch)'
|
||||
compdef ggpull=git
|
||||
alias ggpush='git push origin $(current_branch)'
|
||||
alias ggpush='git push origin $(git_current_branch)'
|
||||
compdef ggpush=git
|
||||
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
|
||||
alias ggpnp='git pull origin $(git_current_branch) && git push origin $(git_current_branch)'
|
||||
compdef ggpnp=git
|
||||
|
||||
|
Reference in New Issue
Block a user