main: use _command_exists

Addresses bash-it/bash-it#1632
This commit is contained in:
John D Pell
2021-09-09 16:17:10 -07:00
parent 8e169388d2
commit cace3a591d

View File

@@ -145,7 +145,7 @@ if [ -e "$HOME/.jekyllconfig" ]; then
fi
# BASH_IT_RELOAD_LEGACY is set.
if ! command -v reload &> /dev/null && [ -n "${BASH_IT_RELOAD_LEGACY:-}" ]; then
if ! _command_exists reload && [[ -n "${BASH_IT_RELOAD_LEGACY:-}" ]]; then
case $OSTYPE in
darwin*)
alias reload='source ~/.bash_profile'