mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Merge e2def7f1f3 into caa15548c1
This commit is contained in:
commit
c1fd0c8faa
2 changed files with 8 additions and 3 deletions
|
|
@ -54,10 +54,15 @@ function current_branch() {
|
|||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
function git_current_upstream(){
|
||||
local upstream=$(git config --get branch."$(current_branch)".remote) || return
|
||||
echo $upstream
|
||||
}
|
||||
|
||||
# these aliases take advantage of the previous function
|
||||
alias ggpull='git pull origin $(current_branch)'
|
||||
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
|
||||
compdef ggpnp=git
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue