|
|
|
@ -180,23 +180,17 @@ function has_typed_input() { |
|
|
|
return |
|
|
|
return |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Don't ask for confirmation before updating if in auto mode |
|
|
|
# If in reminder mode or user has typed input, show reminder and exit |
|
|
|
if [[ "$update_mode" = auto ]]; then |
|
|
|
if [[ "$update_mode" = reminder ]] || has_typed_input; then |
|
|
|
update_ohmyzsh |
|
|
|
printf '\r\e[0K' # move cursor to first column and clear whole line |
|
|
|
return $? |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# If in reminder mode show reminder and exit |
|
|
|
|
|
|
|
if [[ "$update_mode" = reminder ]]; then |
|
|
|
|
|
|
|
echo "[oh-my-zsh] It's time to update! You can do that by running \`omz update\`" |
|
|
|
echo "[oh-my-zsh] It's time to update! You can do that by running \`omz update\`" |
|
|
|
return 0 |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# If user has typed input, show reminder and exit |
|
|
|
# Don't ask for confirmation before updating if in auto mode |
|
|
|
if has_typed_input; then |
|
|
|
if [[ "$update_mode" = auto ]]; then |
|
|
|
echo |
|
|
|
update_ohmyzsh |
|
|
|
echo "[oh-my-zsh] It's time to update! You can do that by running \`omz update\`" |
|
|
|
return $? |
|
|
|
return 0 |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Ask for confirmation and only update on 'y', 'Y' or Enter |
|
|
|
# Ask for confirmation and only update on 'y', 'Y' or Enter |
|
|
|
|