1
0
Fork 0

load omz:function:color to a local variable

pull/5/head
Jonathan Dahan 13 years ago
parent 070e4eeadf
commit 49a88c66d5

@ -17,16 +17,18 @@
zstyle -t ':omz:function:update-omz' auto-commit || local nocommit='--no-commit' zstyle -t ':omz:function:update-omz' auto-commit || local nocommit='--no-commit'
zstyle -t ':omz:function:update-omz' upstream '_upstream' zstyle -t ':omz:function:update-omz' upstream '_upstream'
zstyle -t ':omz:function:update-omz' color '_color'
local current_path=$PWD local current_path=$PWD
cd $OMZ_HOME || return 1 cd $OMZ_HOME || return 1
if git pull --rebase $nocommit --strategy=recursive -X ours ${_upstream:-origin} master && git submodule update --recursive; then if git pull --rebase $nocommit --strategy=recursive -X ours ${_upstream:-origin} master && git submodule update --recursive; then
zstyle -t ':omz:function:update-omz' color && printf "$FG[blue]" is-true _color && printf "$FG[blue]"
printf 'Hooray! oh-my-zsh is up-to-date :)\n' printf 'Hooray! oh-my-zsh is up-to-date :)\n'
else else
zstyle -t ':omz:function:update-omz' color && printf "$FG[red]" is-true _color && printf "$FG[red]"
printf 'Oh no! There was an error updating oh-my-zsh :(\n' printf 'Oh no! There was an error updating oh-my-zsh :(\n'
fi fi
unset _color
cd "$current_path" || return 1 cd "$current_path" || return 1

Loading…
Cancel
Save