From 867d76cafc8e7eca1691723644771f312838b003 Mon Sep 17 00:00:00 2001 From: nojhan Date: Sun, 29 Oct 2023 10:39:57 +0100 Subject: [PATCH] feat: version guard Now depends on _lp_vcs_remote introduced by LP 2.2.0 --- gitcrux.theme | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gitcrux.theme b/gitcrux.theme index d3c0157..e83971a 100644 --- a/gitcrux.theme +++ b/gitcrux.theme @@ -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=( "" "" )