Add default value and test if command exists

pull/1683/head
BarbUk 2020-11-07 15:54:33 +01:00
parent 28ac02b05d
commit 4f1060b7cc
No known key found for this signature in database
GPG Key ID: DB301C759539E9FE
1 changed files with 4 additions and 2 deletions

View File

@ -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