From 4f1060b7cc3db71a64fb5638742686031e0d3816 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Sat, 7 Nov 2020 15:54:33 +0100 Subject: [PATCH] Add default value and test if command exists --- themes/barbuk/barbuk.theme.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/barbuk/barbuk.theme.bash b/themes/barbuk/barbuk.theme.bash index 89014b1b..c864f856 100644 --- a/themes/barbuk/barbuk.theme.bash +++ b/themes/barbuk/barbuk.theme.bash @@ -68,9 +68,11 @@ function _exit-code { } function _prompt { - local exit_code="$?" wrap_char=' ' dir_color=$green ssh_info='' python_venv='' host command_duration + local exit_code="$?" wrap_char=' ' dir_color=$green ssh_info='' python_venv='' host command_duration= - command_duration=$(_command_duration) + if _command_exists _command_duration; then + command_duration=$(_command_duration) + fi _exit-code exit_code _git-uptream-remote-logo