From eabdf41b833609bea386f21ebe8200198b48dbb3 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 19 Sep 2021 21:32:19 -0700 Subject: [PATCH] lib/theme: use `_command_exists` --- themes/base.theme.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 1e0409d3..f9f5190d 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -396,7 +396,7 @@ function hg_prompt_vars { function nvm_version_prompt { local node - if declare -f -F nvm &> /dev/null; then + if _is_function nvm; then node=$(nvm current 2> /dev/null) [[ "${node}" == "system" ]] && return echo -e "${NVM_THEME_PROMPT_PREFIX}${node}${NVM_THEME_PROMPT_SUFFIX}" @@ -433,8 +433,8 @@ function rbfu_version_prompt { } function chruby_version_prompt { - if declare -f -F chruby &> /dev/null; then - if declare -f -F chruby_auto &> /dev/null; then + if _is_function chruby; then + if _is_function chruby_auto; then chruby_auto fi