feat: version guard

Now depends on _lp_vcs_remote introduced by LP 2.2.0
This commit is contained in:
Johann Dreo 2023-10-29 10:39:57 +01:00
commit 867d76cafc

View file

@ -412,6 +412,11 @@ gitcrux() {
_lp_gitcrux_theme_activate() {
_lp_default_theme_activate
if ! _lp_version_greatereq 2 2 0 ; then
_lp_join "." ${_LP_VERSION[@]}
printf "WARNING: the GitCrux theme requires Liquid Prompt >= 2.2.0, but you have version $lp_join, some features will not work and the prompt may crash.\n"
fi
GITCRUX_ARROW_RIGHT=( ${GITCRUX_ARROW_RIGHT[@]+"${GITCRUX_ARROW_RIGHT[@]}"} )
[[ ${#GITCRUX_ARROW_RIGHT[@]} == 0 ]] && GITCRUX_ARROW_RIGHT=( "" "" )