You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
730 B
24 lines
730 B
# Jonathan Dahan <jonathan@jedahan.com>
|
|
|
|
# To auto-commit changes from upstream without review (dangerous!), add to your zshrc:
|
|
#
|
|
# zstyle ':omz:function:update-omz' auto-commit 'yes'
|
|
#
|
|
# This will still favor local changes when there are conflicts
|
|
|
|
current_path=$PWD
|
|
cd $HOME/.oh-my-zsh
|
|
|
|
zstyle -t ':omz:function:update-omz' auto-commit || local nocommit='--no-commit'
|
|
|
|
if git pull $nocommit --strategy=recursive -X ours origin master; then
|
|
zstyle -t ':omz:function:update-omz' color && printf "$FG[blue]"
|
|
printf 'Hooray! oh-my-zsh is up-to-date :)'
|
|
touch ~/.omz-update
|
|
else
|
|
zstyle -t ':omz:function:update-omz' color && printf "$FG[red]"
|
|
printf 'Oh no! There was an error updating oh-my-zsh :('
|
|
fi
|
|
|
|
cd "$current_path"
|