fix: Correct broken zsh init in absence of precmd_functions (#180)

This commit is contained in:
Kevin Song 2019-08-18 04:07:38 -07:00 committed by Matan Kushner
parent dfe2ae643a
commit 572a07c72d

View File

@ -152,6 +152,12 @@ starship_precmd() {
starship_preexec(){
STARSHIP_START_TIME="$(date +%s)"
};
if [[ -z "${precmd_functions+1}" ]]; then
precmd_functions=()
fi;
if [[ -z "${preexec_functions+1}" ]]; then
preexec_functions=()
fi;
if [[ ${precmd_functions[(ie)starship_precmd]} -gt ${#precmd_functions} ]]; then
precmd_functions+=(starship_precmd);
fi;