Last-minute minor fixes:
* Delete .latest_version after upgrading. Having a cache brings in these
complexities.
* Print warning to stderr, to distinguish it from the normal output.
* Update help to be in sync with the README.md.
if [[ -n ${zlatest_version} && ${_zversion} != ${zlatest_version} ]]; then
print -PR "%F{yellow}Latest zimfw version is %B${zlatest_version}%b. You're using version %B${_zversion}%b. Run %Bzimfw upgrade%b to upgrade.%f"$'\n'
print -u2 -PR "%F{yellow}Latest zimfw version is %B${zlatest_version}%b. You're using version %B${_zversion}%b. Run %Bzimfw upgrade%b to upgrade.%f"$'\n'
print -PR "%F{yellow}Latest zimfw version is %B${zlatest_version}%b. You're using version %B${_zversion}%b. Run %Bzimfw upgrade%b to upgrade.%f"$'\n'
print -u2 -PR "%F{yellow}Latest zimfw version is %B${zlatest_version}%b. You're using version %B${_zversion}%b. Run %Bzimfw upgrade%b to upgrade.%f"$'\n'
fi
fi
}
@ -276,7 +276,7 @@ _zimfw_compile() {
}
_zimfw_info(){
print -R 'zimfw version: '${_zversion}' (previous commit is 7fdf65c)'
print -R 'zimfw version: '${_zversion}' (previous commit is 64f36fe)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
@ -310,14 +310,17 @@ _zimfw_upgrade() {
return1
fi
fi
_zimfw_mv ${ztarget}{.new,}&& _zimfw_print -P 'Done with upgrade.'
# .latest_version can be outdated and will yield a false warning if zimfw is
# upgraded before .latest_version is refreshed. Bad thing about having a cache.